/* Global box-sizing to ensure consistent sizing */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 20px;
}

/* Dashboard Overview section styling to resemble Quick Return styling */
#dashboard-overview {
    max-width: 600px; /* Same width as Quick Return */
    max-height: 400px;
    margin: 20px auto; /* Center the section with margin */
    padding: 20px; /* Padding around the section */
    background-color: #f9f9f9; /* Light background to match Quick Return */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    text-align: center;
    display: flex; /* Make it a flex container */
    flex-direction: column;
    gap: 15px; /* Space between grey boxes */
}

#dashboard-overview div {
    padding: 15px; /* Add padding inside each box */
    background-color: #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); /* Slight shadow for each box */
    font-weight: bold;
    text-align: center;
}


/* Style the form container */
form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Style form labels */
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* Style input fields */
form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
/* Style both submit and find book buttons */
form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

/* Specific style for the "Find Book" button */
#find-book-btn {
    background-color: #007bff;
    margin-bottom: 15px;
}

/* Hover effect for the buttons */
form button:hover {
    background-color: #0056b3;
}

#find-book-btn:hover {
    background-color: #0056b3;
}

#quick-return {
    max-width: 600px; /* Limit the width of the Quick Return section */
    max-height: 400px;
    margin: 20px auto; /* Center it in the available space */
    padding: 20px; /* Add padding around the section */
    background-color: #f9f9f9; /* Background for the section */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Shadow effect */
    text-align: center; /* Center text in the section */
}



/* Form styling */
#quick-return-form {
    margin-top: 20px; /* Space above the form */
}

#quick-return-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

#quick-return-form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

#quick-return-form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#quick-return-form button:hover {
    background-color: #0056b3;
}

/* Message box styling */
#quick-return-form #return-message {
    margin-top: 10px;
    font-weight: bold;
    color: #007bff;
}


/* Responsive design for smaller screens */
@media (max-width: 600px) {
    #quick-return {
        padding: 10px;
    }
}


/* Style the books table container */
.books-table-container {
    max-height: 650px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style the books table */
.books-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.books-table th, .books-table td {
    border: 1px solid #ddd;
    padding: 5px 10px; /* Reduce padding for smaller row height */
    line-height: 1.2; /* Adjust line height for a more compact appearance */
    font-size: 12px;
    text-align: left;
}

.books-table th {
    background-color: #007bff;
    font-size: 14px;
    color: white;
}

/* Style the table rows */
.books-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.books-table tr:hover {
    background-color: #ddd;
}

/* Add styles for the toggle button */
#toggle-add-book-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    margin: 10px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#toggle-add-book-btn:hover {
    background-color: #0056b3;
}

#add-book-section {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Specific styles for the loan form */
#loan-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#loan-form label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

#loan-form input[type="text"],
#loan-form select {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#loan-form select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

#loan-form button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 20px;
}

#loan-form button:hover {
    background-color: #0056b3;
}
#loan-form button:disabled,
button[disabled]{
  border: 1px solid #999999;
  background-color: #cccccc;
  color: #666666;
}

#loan-form #student-dropdown,
#loan-form #book-dropdown {
    max-height: 150px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

#loan-form #student-dropdown:focus,
#loan-form #book-dropdown:focus {
    z-index: 10;
}

/* Message box styling */
#loan-form #message-box {
    margin-top: 20px;
    font-weight: bold;
    color: #007bff;
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
}

section h2 {
    text-align: center;
    margin-bottom: 20px;
}

main {
    display: flex;
    justify-content: center;
   /*  min-height: 80vh; */
}

/* Increase the z-index of the dropdowns when expanded */
#loan-form #student-dropdown:focus,
#loan-form #book-dropdown:focus {
    z-index: 1000;
}

/* Style the student table container */
.students-table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style the student table */
.students-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.students-table th, .students-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.students-table th {
    background-color: #007bff; /* Choose a distinct color or reuse */
    color: white;
}

/* Style the table rows */
.students-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.students-table tr:hover {
    background-color: #ddd;
}

/* Styling the student form similar to the loan form */
#student-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#student-form label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

#student-form input[type="text"],
#student-form select {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#student-form button {
    padding: 10px 20px;
    background-color: #007bff; /* A different shade to distinguish */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

#student-form button:hover {
    background-color: #0056b3;
}

#overdue-books {
    overflow: auto;
    min-height: 400px;
    height: 400px;
    margin: 20px auto; /* Center it in the available space */
    padding: 20px; /* Add padding around the section */
    background-color: #f9f9f9; /* Background for the section */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Shadow effect */
    text-align: center; /* Center text in the section */
    
}
.overdue-table-container {
    min-height: 340px;
    min-width: 500px;
    max-width: 600px;
    margin: 20px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.overdue-table {
    width: 100%;
    border-collapse: collapse;
}

.overdue-table th, .overdue-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.overdue-table th {
    background-color: #007bff;
    color: white;
}
