/* General Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa; /* Light grey background */
    color: #333;
}

/* Wrapper for content */
.wrapper {
    max-width: 960px; /* Max width for content */
    margin: 30px auto; /* Center content with some top/bottom margin */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Headings */
h2, h3, h4 {
    color: #0056b3; /* A nice blue */
}

/* Forms */
form fieldset {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fefefe;
}

form legend {
    width: auto; /* Shrink legend to content */
    padding: 0 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    border-bottom: none; /* Remove default legend border */
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 1em;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.required {
    color: #dc3545;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.pull-right {
    float: right;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Table Styling */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.table thead th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.table tbody tr:hover {
    background-color: #e2f4ff; /* Light blue on hover */
}

.table .fa {
    font-size: 1.2em;
    margin-right: 5px;
    color: #007bff; /* Default icon color */
}

.table .fa-trash {
    color: #dc3545; /* Red for delete icon */
}

/* Responsive adjustments for forms */
@media (max-width: 768px) {
    .wrapper {
        margin: 20px 10px; /* Less margin on smaller screens */
        padding: 15px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    .btn {
        width: 100%; /* Full width buttons */
        margin-top: 10px;
    }
    .btn.ml-2 {
        margin-left: 0 !important; /* Override Bootstrap's margin-left */
    }
}

/* General spacing */
.mt-5 { margin-top: 3rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mr-3 { margin-right: 1rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; } /* For fieldsets */

/* Text alignment helpers */
.text-center { text-align: center; }
.text-muted { color: #6c757d !important; }