/* style.css - Extra robust für iPhone, Android & PC */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --background-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 15px; /* Etwas Luft zum Rand auf dem Handy */
}

.main-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* =========================================
   BUTTONS (Touch-freundlich für Handys) 
   ========================================= */
button, .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Auf Handys immer volle Breite */
    padding: 14px 20px;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none; /* Überschreibt das Apple-Standard-Design */
}

button:active, .btn:active {
    transform: scale(0.98);
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary { background-color: var(--secondary-color); color: white; }
.btn-secondary:hover { background-color: var(--secondary-hover); }

.btn-success, button[type="submit"] { background-color: var(--success-color); color: white; }
.btn-success:hover, button[type="submit"]:hover { background-color: var(--success-hover); }

/* Container für die Admin-Buttons */
.admin-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-buttons .btn {
    margin-bottom: 0; /* Verhindert doppelte Abstände */
    width: 100%;
}

/* =========================================
   HEADER (Begrüßung & Logout)
   ========================================= */
.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    line-height: 1.2;
}

.logout-link {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    background: #fee2e2; /* Leicht rötlicher Hintergrund für Handys */
    border-radius: 8px;
    width: 100%;
    display: block;
}

/* =========================================
   AUFGABEN KARTEN
   ========================================= */
.task-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--primary-color);
}

.task-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.task-title {
    font-size: 1.25rem;
    margin: 0;
}

.task-due-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

/* =========================================
   FORMULARE
   ========================================= */
form {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 15px;
}

input[type="text"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px; 
    font-family: inherit;
    background-color: #f8fafc;
    -webkit-appearance: none; 
    margin-bottom: 15px; /* NEU: Macht einen schönen Abstand unter jedem Feld */
}

/* NEU: Gibt dem Haupt-Button noch etwas extra Luft nach oben */
button[type="submit"] {
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Macht einen leichten, schicken Schattenwurf */
}
/* =========================================
   MEDIA QUERIES (Für PC und Tablet)
   ========================================= */
@media (min-width: 600px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .logout-link {
        width: auto;
        background: transparent;
        padding: 10px;
    }

    .admin-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .admin-buttons .btn {
        width: auto; /* Auf dem PC sind die Buttons nebeneinander und nicht 100% breit */
    }

    button, .btn {
        display: inline-flex;
        width: auto;
    }

    button[type="submit"] {
        width: 100%; /* Der Speichern-Button darf unten groß bleiben */
        margin-top: 15px;
    }

    .task-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .task-due-date {
        text-align: right;
    }
}