body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; background-color: #f4f6f9; }
nav { background-color: #343a40; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
nav a { color: #ccc; margin-right: 20px; text-decoration: none; cursor: pointer; font-size: 16px; }
nav a:hover { color: white; }
.container { padding: 20px; max-width: 1200px; margin: 0 auto; }
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: #007bff; color: white; }
tr:hover { background-color: #f1f1f1; }
button { padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: 0.3s; }
button:hover { opacity: 0.9; }
input, select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; }
.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: white; margin: 10% auto; padding: 20px; border-radius: 8px; width: 400px; position: relative; animation: slideDown 0.3s; }
.close { position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; }
.filter-bar { background: white; padding: 15px; border-radius: 8px; margin-bottom: 20px; display: flex; gap: 10px; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.receipt-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; }
.receipt-box { background: white; width: 400px; margin: 50px auto; padding: 30px; border-radius: 5px; box-shadow: 0 0 20px rgba(0,0,0,0.3); font-family: 'Courier New', Courier, monospace; }
.receipt-header { text-align: center; border-bottom: 2px dashed #333; padding-bottom: 10px; margin-bottom: 15px; }
.receipt-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.receipt-table { width: 100%; border-top: 2px solid #333; border-bottom: 2px solid #333; margin: 15px 0; }
.receipt-table th, .receipt-table td { border: none; padding: 5px 0; text-align: right; }
.receipt-table th:first-child, .receipt-table td:first-child { text-align: left; }
.no-print { display: block; }
@media print { .no-print { display: none; } body * { visibility: hidden; } .receipt-box, .receipt-box * { visibility: visible; } .receipt-box { position: absolute; left: 0; top: 0; width: 100%; margin: 0; box-shadow: none; } }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ================= NOTIFICATION TOAST (NEW) ================= */
#notification-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: #fff; min-width: 300px; padding: 15px 20px;
    border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex; justify-content: space-between; align-items: center;
    border-left: 6px solid #28a745; /* Green */
    animation: slideIn 0.3s ease-out forwards; transition: opacity 0.3s;
}
.toast.error { border-left-color: #dc3545; /* Red */ }
.toast span { font-size: 14px; color: #333; font-weight: 600; }
.toast .close-btn { background: none; border: none; font-size: 18px; color: #999; cursor: pointer; margin-left: 15px; }
.toast .close-btn:hover { color: #333; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
/* ================= MODAL FORM STYLING FIXES ================= */
.modal-content form {
    display: flex;
    flex-direction: column;
}

.modal-content form label {
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
    display: block; /* Forces label to its own line */
}

.modal-content form input,
.modal-content form select,
.modal-content form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fcfcfc;
    /* This is the magic rule that stops inputs from overflowing the modal bounds */
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.modal-content form input:focus,
.modal-content form select:focus {
    border-color: #007bff;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.25);
}

.modal-content form button[type="submit"] {
    margin-top: 25px;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.modal-content form button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Ensure hidden containers (like the password field on edit) also stack correctly */
#passwordFieldContainer,
#feeFieldContainer {
    display: flex;
    flex-direction: column;
    width: 100%;
}