body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

header {
    background: #1f3b57;
    color: white;
    padding: 32px 24px 24px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 10px 0 20px;
    opacity: 0.9;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

nav a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 999px;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.28);
}

main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.card,
.page-box {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card .badge {
    margin-top: auto;
    align-self: center;
    min-width: 120px;
    text-align: center;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.card h2 {
    margin-top: 0;
    color: #1f3b57;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card p {
    line-height: 1.5;
    text-align: left;
}

.badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: white;
    color: #1f3b57;
    font-size: 0.8rem;
    font-weight: bold;
}

footer {
    text-align: center;
    margin: 48px 0 24px;
    color: #667085;
    font-size: 0.9rem;
}

.card-gantt {
    background: #dbeafe;
}

.card-vorlesung {
    background: #dcfce7;
}

.card-re {
    background: #ffedd5;
}

.card-download {
    background: #ede9fe;
}

.card-gantt {
    border-top: 6px solid #2563eb;
}

.card-vorlesung {
    border-top: 6px solid #16a34a;
}

.card-re {
    border-top: 6px solid #ea580c;
}

.card-download {
    border-top: 6px solid #7c3aed;
}

.task-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin: 28px 0;
}

.task-form label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    color: #1f3b57;
}

.task-form input {
    margin-top: 6px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
}

.task-form button {
    padding: 11px 18px;
    border: none;
    border-radius: 8px;
    background: #1f3b57;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.task-form button:hover {
    background: #2b5178;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.task-table th,
.task-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.task-table th {
    background: #eef2f7;
    color: #1f3b57;
}

.task-table tr:nth-child(even) {
    background: #f8fafc;
}

@media (max-width: 760px) {
    .task-form {
        grid-template-columns: 1fr;
    }
}

.edit-button {
    display: inline-block;
    padding: 7px 12px;
    margin-right: 8px;
    border-radius: 8px;
    background: #1f3b57;
    color: white;
    font-weight: bold;
    text-decoration: none;
    min-width: 95px;
    text-align: center;
}

.edit-button:hover {
    background: #2b5178;
}

.task-table form {
    display: inline-block;
}

.back-link {
    color: #1f3b57;
    font-weight: bold;
}

.delete-button {
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    min-width: 95px;
    background: #dc2626;
    color: white;

    font-weight: bold;
    font-size: 0.9rem;

    cursor: pointer;
}

.delete-button:hover {
    background: #b91c1c;
}

.gantt-container {
    margin-top: 30px;
}

.gantt-header,
.gantt-row {
    display: flex;
    align-items: center;
}

.gantt-task-name {
    width: 220px;
    font-weight: bold;
    padding: 4px;
}

.gantt-weeks {
    display: flex;
}

.week-cell {
    width: 28px;
    height: 28px;

    border: 1px solid #e5e7eb;

    box-sizing: border-box;
}

.bar-cell {
    width: 28px;
    height: 28px;

    background: #2563eb;

    border: 1px solid white;

    box-sizing: border-box;
}

.milestone {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #16a34a;
    font-size: 18px;
    font-weight: bold;
}

.task-form select {
    margin-top: 6px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
}