/* Basis */
body {
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 1.8rem;
    margin: 40px auto 20px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

h1::before {
    content: "";
    font-size: 1.5em;
}

/* Navigation */
.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    background-color: #1e1e1e;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}

.navbar a {
    color: #bb86fc;
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
    transition: 0.2s;
    font-size: 1rem;
}

.navbar a:hover {
    color: white;
}

/* Cards & Formulare */
.card, .form-card {
    max-width: 600px;
    margin: 30px auto;
    background: #1e1e1e;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(187,134,252,0.15);
}

.form-card {
    display: flex;
    flex-direction: column;
}

.form-card label {
    margin-top: 15px;
    font-weight: 500;
    color: #ccc;
}

.form-card input,
.form-card select,
.form-card button {
    background-color: #2a2a2a;
    color: #fff;
    border: none;
    padding: 10px;
    margin-top: 5px;
    border-radius: 8px;
    font-size: 1em;
}

.form-card button {
    background-color: #bb86fc;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s ease;
}

.form-card button:hover {
    background-color: #d0aaff;
}

/* Tabellen */
.list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
}

.list-table th, .list-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.list-table th {
    background-color: #181818;
    color: #bb86fc;
    font-weight: bold;
}

/* Sparziele */
.sparziel {
    margin: 20px 0;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,255,200,0.1);
}

.progress-bar {
    width: 100%;
    height: 25px;
    background-color: #333;
    border-radius: 15px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #00c980;
    transition: width 0.5s ease;
}

/* Messages */
.success {
    color: #00c980;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

.error {
    color: #ff6b6b;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

/* Diagramm-Canvas */
canvas {
    display: block;
    max-width: 800px;
    margin: 40px auto;
}

/* Responsive */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .navbar a {
        padding: 8px;
        font-size: 1rem;
    }

    .card, .form-card {
        margin: 20px 10px;
    }

    .list-table th, .list-table td {
        padding: 8px;
        font-size: 0.85rem;
    }
}

.sparziel p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #ccc;
}

.monats-nav {
    display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            margin-bottom: 30px;
            font-size: 1.1rem;
}

.monats-nav a {
    color: #bb86fc;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s ease-in-out;
}

.monats-nav a:hover {
    color: #d6b3ff;
    text-decoration: underline;
}

.monats-nav strong {
    color: #fff;
}

.table-container {
    overflow-x: auto;
    width: 100%;
	margin-top: 30px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 600px; /* wichtig für mobile Scrollbarkeit */
}

.list-table th, .list-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    white-space: nowrap;
}

button, .form-card button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    background-color: #bb86fc;
    color: #000;
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #d6aaff;
}

input, select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    background-color: #2a2a2a;
    color: #fff;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e1e;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-logo {
    font-size: 1.4rem;
    color: #bb86fc;
}

.nav-toggle {
    font-size: 1.8rem;
    color: #bb86fc;
    cursor: pointer;
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: #bb86fc;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.2s;
}

.nav-links li a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #2a2a2a;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 10px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        padding: 10px 0;
    }
}

/* Hamburger Icon */
.hamburger-menu {
    background-color: #1e1e1e;
    padding: 10px 20px;
    text-align: right;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-icon {
    font-size: 1.8rem;
    color: #bb86fc;
    cursor: pointer;
}

/* Sidebar-Stil */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
	left: auto;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #1e1e1e;
    color: #fff;
    padding: 20px;
    transition: left 0.3s ease;
    z-index: 2000;
    box-shadow: 5px 0 15px rgba(0,0,0,0.6);
}

.sidebar.show {
    right: 0;
}

.sidebar .close-btn {
    font-size: 1.8rem;
    text-align: right;
    margin-bottom: 20px;
    cursor: pointer;
    color: #bb86fc;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 16px 0;
}

.sidebar ul li a {
    color: #bb86fc;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

.sidebar ul li a:hover {
    color: #fff;
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(187,134,252,0.3);
    color: white;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

#confirmYes {
    background: #bb86fc;
    color: #000;
}

#confirmYes:hover {
    background: #d2a4ff;
}

/* Modal als Popup oben */
.top-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.popup-box {
    background: #1e1e1e;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(187,134,252,0.4);
    text-align: center;
    min-width: 300px;
    max-width: 90vw;
    animation: fadeIn 0.2s ease-out;
}

.toast-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2a2a2a;
    color: #bb86fc;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

/* Buttons */
.modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-buttons button {
    padding: 8px 16px;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

#confirmYes {
    background: #bb86fc;
    color: #000;
}

#confirmYes:hover {
    background: #d2a4ff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.einnahme {
    background-color: rgba(0, 200, 128, 0.08);
    color: #00c980;
}

.ausgabe {
    background-color: rgba(255, 107, 107, 0.08);
    color: #ff6b6b;
}

.list-table td strong {
    font-weight: bold;
}
