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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

header h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.nav-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #e7f3ff;
    color: #0056b3;
}

.list-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.list-wrapper {
    margin-top: 20px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.list-table thead {
    background: #343a40;
    color: white;
}

.list-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.list-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.list-table tbody tr:hover {
    background: #f8f9fa;
}

.legend {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.color-box.red { background-color: #dc3545; }
.color-box.pink { background-color: #e91e63; }
.color-box.yellow { background-color: #ffc107; }
.color-box.green { background-color: #28a745; }
.color-box.gray { background-color: #6c757d; }

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

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

.btn-edit {
    background: #ffc107;
    color: #333;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-edit:hover {
    background: #e0a800;
}

.search-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    max-width: 300px;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: #343a40;
    color: white;
}

th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Status colors */
.status-red {
    background-color: #ffebee !important;
}

.status-red td {
    background-color: #ffebee;
}

.status-pink {
    background-color: #fce4ec !important;
}

.status-pink td {
    background-color: #fce4ec;
}

.status-yellow {
    background-color: #fff8e1 !important;
}

.status-yellow td {
    background-color: #fff8e1;
}

.status-green {
    background-color: #e8f5e9 !important;
}

.status-green td {
    background-color: #e8f5e9;
}

.status-gray {
    background-color: #f5f5f5 !important;
    color: #9e9e9e;
}

.status-gray td {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

/* Red highlight for amounts */
.amount-red {
    color: #dc3545;
    font-weight: bold;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    display: inline-block;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

tfoot {
    background: #f8f9fa;
    font-weight: bold;
}

tfoot td {
    border-top: 2px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

