body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

h1, h2 {
    color: #333;
    margin-bottom: 12px;
    margin-top: 24px;
}

.card {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: center;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    font-size: 1.1em;
}

.icon {
    font-size: 1.2em;
}

.fertig-row {
    background-color: #e6f4ea;
}

.nicht-fertig-row {
    background-color: #fdecea;
}

button {
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 0.9em;
}

form {
    display: inline;
}

input[type="text"] {
    padding: 4px;
    margin-right: 4px;
}

.add-class-form button {
    display: block;
    margin: 12px auto 0 auto; /* top margin + horizontal centering */
}

/* ------------------------------
   Responsive Table Enhancements
   ------------------------------ */

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.responsive-table th,
.responsive-table td {
    text-align: left;
    padding: 12px;
}

.responsive-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

button {
    display: inline-block;       /* ensures centering works */
    padding: 6px 14px;           /* smaller size than before */
    font-size: 0.9em;
    border: none;
    border-radius: 6px;          /* rounded corners for all */
    cursor: pointer;
    background-color: #0077cc;   /* blue default */
    color: white;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
    background-color: #005fa3;   /* darker blue on hover */
}

button:active {
    transform: scale(0.97);      /* small press effect */
}

/* Danger button for destructive actions */
button.danger {
    background-color: #cc3333;
    color: white;
}

button.danger:hover {
    background-color: #a52828;
}


/* Add class form */
.add-class-form input[type="text"] {
    margin: 4px 0;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}

.add-class-form button {
    margin-top: 8px;
}

/* Mobile: collapse table into stacked rows */
@media (max-width: 100px) {
    .responsive-table thead {
        display: none; /* hide table headers */
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        flex: 1;              /* label takes left side */
        text-align: left;
        margin-right: 12px;
    }

    .responsive-table td span,
    .responsive-table td form {
        flex: 1;              /* value/action takes right side */
        text-align: right;
    }

    .responsive-table td button {
        flex: unset;
        width: auto;
        margin: 4px 6px 4px 0;
        text-align: center;
    }

    .responsive-table button {
        width: 100%;
        margin: 4px 0;
    }
}

