:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --light-gray: #e9ecef;
}

/* Basic Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    transition: border-bottom 0.3s ease;
}

nav ul li a:hover {
    border-bottom: 2px solid white;
}

/* Flash Messages */
.flashes {
    list-style: none;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.flashes li {
    margin-bottom: 5px;
}

.flashes.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flashes.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Forms */
form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

input[type="checkbox"] {
    margin-right: 5px;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Table Styles */
#leaseTable,
#mtmLeaseTable,
#userTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

#leaseTable th,
#leaseTable td,
#mtmLeaseTable th,
#mtmLeaseTable td,
#userTable th,
#userTable td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

#leaseTable th,
#mtmLeaseTable th,
#userTable th {
    background-color: var(--light-gray);
    font-weight: 700;
    cursor: pointer;
}



#leaseTable tbody tr:hover,
#mtmLeaseTable tbody tr:hover,
#userTable tbody tr:hover {
    background-color: #e9ecef;
}

.expired {
    background-color: #f8d7da;
}

.expiring-soon {
    background-color: #fff3cd;
}

/* Modal Styles */
.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); 
    align-items: center;
    justify-content: center;
}

.modal.modal-active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%; 
    max-width: 700px; 
    position: relative;
}

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

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-checkbox {
    flex-direction: row;
    align-items: center;
}

.form-group-checkbox label {
    margin-right: 0.5rem;
}

/* Analytics Specific Styles */
.analytics-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.summary-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 10px;
    flex: 1;
    min-width: 280px;
    text-align: center;
}
.summary-card h2 {
    color: var(--primary-color);
    margin-top: 0;
}
.chart-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
.chart-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 10px;
    flex: 1;
    min-width: 45%;
    max-width: 48%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .chart-card {
        min-width: 90%;
        max-width: 90%;
    }
}

/* Users Page Specific Styles */
.form-section,
.table-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-section h5,
.table-section h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.table-section button {
    margin-right: 5px;
}

.delete-button {
    background-color: var(--danger-color);
}

.delete-button:hover {
    background-color: #c82333;
}

.delete-form {
    display: inline-block;
    background: none;
    padding: 0;
    box-shadow: none;
}