* {
    box-sizing: border-box;
}

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

.container {
    width: 90%;
    max-width: 900px;
    margin: 30px auto;
}

h1, h2 {
    margin-bottom: 10px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.align-end {
    display: flex;
    align-items: end;
}

input,
select,
button {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    cursor: pointer;
    border: none;
    background: #2563eb;
    color: white;
    font-weight: bold;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #16a34a;
}

.btn-success:hover {
    background: #15803d;
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
}

.message.success {
    background: #dcfce7;
    color: #166534;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pending {
    background: #e5e7eb;
    color: #374151;
}

.status-in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-done {
    background: #dcfce7;
    color: #166534;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions button {
    width: auto;
    min-width: 90px;
}

.empty {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

pre {
    background: #111827;
    color: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

@media (max-width: 768px) {
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 10px;
    }

    td {
        border: none;
        padding: 8px 0;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #374151;
    }
}
