/* ── Success animation ── */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

p[style*="color:green"] {
    background-color: #e6f9f0;
    color: #038a57;
    padding: 10px 15px;
    border-left: 4px solid #04AA6D;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideIn 0.4s ease, fadeOut 3s ease 1s forwards;
}

/* ── General ── */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    padding: 30px 20px;
}

/* ── Success & Error Messages ── */
p[style*="color:green"] {
    background-color: #e6f9f0;
    color: #038a57;
    padding: 10px 15px;
    border-left: 4px solid #04AA6D;
    margin-bottom: 20px;
    font-size: 14px;
}

p[style*="color:red"] {
    background-color: #fdecea;
    color: #c0392b;
    padding: 10px 15px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 8px;
    font-size: 14px;
}

/* ── Form ── */
form {
    background-color: white;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    border-top: 4px solid #04AA6D;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    margin-top: 14px;
}

label:first-child {
    margin-top: 0;
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ddd;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    background-color: white;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #04AA6D;
    box-shadow: 0 0 0 2px rgba(4,170,109,0.15);
}

button[type="submit"] {
    margin-top: 20px;
    width: 100%;
    padding: 11px;
    background-color: #04AA6D;
    color: white;
    border: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #038a57;
}

/* ── Table ── */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 14px;
}

th {
    background-color: #04AA6D;
    color: white;
    padding: 12px 10px;
    text-align: center;
}

td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0faf5;
}

/* ── Delete button ── */
td a {
    color: white;
    background-color: #e74c3c;
    padding: 4px 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

td a:hover {
    background-color: #c0392b;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    body {
        padding: 15px 10px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 5px;
    }
}
