/* style.css */
/* Grundlayout */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: #0f172a; /* dunkelblau-grau */
    color: #e5e7eb;      /* helles Grau */
}

.app {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
}

/* Header */

.app-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.app-header h1 {
    font-size: 1.8rem;
    margin: 0 0 0.25rem;
}

.app-header .subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #9ca3af;
}

/* Cards */

.card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 0.75rem;
    padding: 1.2rem 1rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h2 {
    font-size: 1.2rem;
    margin: 0 0 0.75rem;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Meldungen */

.messages {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.messages-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.8);
    color: #fecaca;
}

/* Formular */

.todo-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-inline {
    flex-wrap: wrap;
}

.field-inline > span,
.field-inline > label {
    margin-right: 0.75rem;
}

.field label {
    font-size: 0.9rem;
    color: #cbd5f5;
}

input[type="text"],
input[type="date"],
textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.95rem;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 1px;
    border-color: #38bdf8;
}

textarea {
    resize: vertical;
    min-height: 4rem;
}

.field-inline input[type="radio"] {
    margin-right: 0.25rem;
}

/* Buttons */

.actions {
    margin-top: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: #0ea5e9;
    color: #0f172a;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.45);
}

.btn:hover {
    background: #38bdf8;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.4);
}

.btn-ghost {
    background: transparent;
    color: #e5e7eb;
    border-color: #475569;
    box-shadow: none;
    padding-inline: 0.8rem;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
}

/* Filterlinks */

.filters {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filters a {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    text-decoration: none;
    color: #9ca3af;
    background: rgba(15, 23, 42, 0.9);
}

.filters a:hover {
    border-color: #475569;
    color: #e5e7eb;
}

.filters a.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: transparent;
}

/* Liste */

.empty-state {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .todo-list {
        grid-template-columns: 1fr 1fr;
    }
}

.todo-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.75rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.95);
}

.todo-main h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.todo-description {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.todo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.meta-item {
    opacity: 0.9;
}

.todo-actions {
    margin-top: 0.2rem;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-muessen {
    background: rgba(248, 113, 113, 0.18);
    color: #fecaca;
}

.badge-wollen {
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
}

.badge-merken {
    background: rgba(52, 211, 153, 0.18);
    color: #bbf7d0;
}

/* Footer */

.app-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
}
