/* Basic Reset & Global Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: #f4f7f9; color: #333; }
.container { max-width: 1200px; margin: 20px auto; padding: 20px; }
a { color: #007bff; text-decoration: none; }

/* Navigation */
nav { background-color: #fff; padding: 15px 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
nav .logo { font-size: 1.5em; font-weight: bold; }
nav ul { list-style: none; display: flex; gap: 20px; }
nav ul a { font-weight: 500; color: #555; }
nav ul a:hover { color: #007bff; }

/* Forms */
form { display: flex; flex-direction: column; gap: 10px; background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 20px; }
input, select, button { padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-size: 1em; }
button { background-color: #007bff; color: white; border: none; cursor: pointer; transition: background-color 0.2s; }
button:hover { background-color: #0056b3; }

/* Grid for Cards */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.client-card { background: #fff; padding: 15px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.client-card h4 { margin-bottom: 10px; }

/* Kanban Board */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px;}
.kanban-column { background-color: #e9ecef; padding: 15px; border-radius: 8px; }
.kanban-column h3 { margin-bottom: 15px; }
.tasks { min-height: 200px; }
.project-card { background-color: #fff; padding: 10px; border-radius: 5px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: grab; }
.project-card small { color: #666; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 8px; }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }



/* payment */

/* --- Payments Page Table --- */
#financeTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#financeTable th, #financeTable td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

#financeTable thead {
    background-color: #f8f9fa;
}

#financeTable tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#financeTable tbody tr:hover {
    background-color: #e9ecef;
}

.manage-btn {
    padding: 8px 12px;
    font-size: 0.9em;
}

/* Styles for Balance Due column */
td.due {
    color: #dc3545; /* Red for due amounts */
    font-weight: bold;
}
td.paid {
    color: #28a745; /* Green for paid/zero balance */
}

/* --- Modal Content Improvements --- */
.modal-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#paymentHistory {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

#paymentHistory li {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}

#paymentHistory li:last-child {
    border-bottom: none;
}