/* === Allgemeines Layout === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #e6f3e6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === Login-Seite === */
.login-card {
    background: #fdfcf7;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: auto;
}

.login-card img {
    max-height: 200px;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    box-sizing: border-box;
}

.login-card button {
    width: 60%;
    margin: 0 auto;
    display: block;
    padding: 0.75rem;
    background-color: #1f8f1f;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-card button:hover {
    background-color: #166b16;
}

/* === Hauptinhalt === */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    margin-top: 70px;
    width: 100%;
}

/* === Dashboard === */
.dashboard-container {
    padding: 2rem;
    background-color: #e6f3e6;
    min-height: 100vh;
}

.dashboard-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .grid-dashboard {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

.tile {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tile h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #1f8f1f;
    border-left: 5px solid #1f8f1f;
    padding-left: 0.5rem;
}

.tile {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 0 1rem; /* ⬅️ horizontaler Abstand links + rechts */
}


.tile li {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #444;
}

/* === Statistikboxen === */
.value-boxes {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.value-box {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.value-label {
    font-weight: bold;
    color: #777;
    font-size: 0.9rem;
}

.value-number {
    font-size: 2.2rem;
    color: #1f1f1f;
}

.sub-stats {
    margin-top: 2rem;
    text-align: center;
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* === Tabellenansicht === */
.table-container {
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    background-color: white;
    padding-right: 1rem; /* 👈 Rechter Innenabstand */
    padding-left: 1rem;  /* Optional für links */
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: center;
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.results-table thead {
    background-color: #f0f8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.results-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.results-table tbody tr:hover {
    background-color: #eef4ee;
}

.results-table tfoot {
    font-weight: bold;
    background-color: #e0eee0;
    border-top: 2px solid #ccc;
}

/* === Navigation === */
.top-nav {
    background-color: #e6f3e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #ccc;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-logo-group {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 40px;
    margin-right: 0.75rem;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1f8f1f;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-list li {
    position: relative;
    list-style: none;
}

.nav-list a.nav-button {
    width: 150px;
    background-color: #166b16;
    color: white;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.nav-list a.nav-button:hover {
    background-color: #1f8f1f;
}

/* === Logout Button === */
.logout-top {
    width: 150px;
    background-color: #cc0000;
    color: white;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
}

.logout-top:hover {
    background-color: #990000;
}

/* === Dropdown Menü === */
.nav-list .has-submenu {
    position: relative;
    list-style: none;
}

.nav-list .has-submenu:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    padding: 0.5rem 0;
    border: 1px solid #cce5cc;
    border-radius: 0.5rem;
    min-width: 180px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    animation: fadeIn 0.2s ease-in-out;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: #166b16;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    width: 100%;
}

.submenu a:hover {
    background-color: #e6f3e6;
    color: #0d590d;
}

/* === Animationen === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-list {
        display: none;
    }
    .main-content {
        padding-top: 80px;
    }
    .burger-button {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        font-size: 2rem;
        z-index: 1002;
        background: none;
        border: none;
        color: #1f8f1f;
    }
}
.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-button {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    box-sizing: border-box;
    display: inline-block;
}

/* Speichern-Button */
.form-button.submit {
    background-color: #166b16;
    color: white;
}

.form-button.submit:hover {
    background-color: #1f8f1f;
}

/* Abbrechen-Button */
.form-button.cancel {
    background-color: #f30505;
    color: white;
}

.form-button.cancel:hover {
    background-color: #e58c8c;
}
.button-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: bold;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    min-width: 110px;
    justify-content: center;
    text-align: center;
    color: white;
}

/* Farben je nach Typ */
.action-button.edit {
    background-color: #1e90ff;
}
.action-button.edit:hover {
    background-color: #0077cc;
}

.action-button.result {
    background-color: #1f8f1f;
}
.action-button.result:hover {
    background-color: #166b16;
}

.action-button.delete {
    background-color: #cc0000;
}
.action-button.delete:hover {
    background-color: #990000;
}

.action-button i {
    font-size: 0.85rem;
}

.form-button-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.form-button {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    color: white;
}

.form-button.cancel {
    background-color: #888;
}
.form-button.cancel:hover {
    background-color: #666;
}

.form-button.save {
    background-color: #1f8f1f;
}
.form-button.save:hover {
    background-color: #166b16;
}

.add-score-button {
    display: inline-block;
    background-color: #166b16;
    color: white;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-bottom: 1.5rem; /* <- Abstand zur Tabelle */
}


.add-score-button:hover {
    background-color: #1f8f1f;
    color: white;
}

