@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@300;400&display=swap');

/* Reset default styles */
body,
ul {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
    overflow: auto;
    /* Allow scrolling on the entire HTML document */
    -ms-overflow-style: none;
    /* For Internet Explorer */
    scrollbar-width: none;
}

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
}

/* Make navbar fixed at the top */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #3674B5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    z-index: 1000;
}

/* Navbar container */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* Navigation Menu */
nav ul {
    list-style-type: none;
    display: flex;
    gap: 20px;
}

/* Navbar Links */
nav ul li {
    display: inline;
}

/* Navbar Links */
nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;
    position: relative;
    border-radius: 5px;
}

/* Professional Hover Effect */
nav ul li a:hover {
    background: linear-gradient(90deg, #265a96, #4a8bd1);
    /* Smooth gradient */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* Adds depth */
    transform: scale(1.05);
    /* Slight pop-up effect */
}

/* Ensure content does not get hidden under navbar */
main {
    flex: 1;
    padding-top: 80px;
}

/* Footer Styling */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
}

/* Center Registration Box */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
    background: #f4f7fc;
    /* Light background to match professional theme */
}

/* Registration Box */
.register-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 350px;
}

/* Heading */
.register-box h2 {
    color: #3674B5;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Input Fields */
.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 90%;
    padding: 10px;
    border: 1px solid #3674B5;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease-in-out;
}

.input-group input:focus {
    border-color: #265a96;
    box-shadow: 0px 0px 8px rgba(38, 90, 150, 0.3);
}

/* Button Styling */
.btn {
    background: linear-gradient(90deg, #3674B5, #4a8bd1);
    color: white;
    font-size: 18px;
    padding: 10px;
    width: 60%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.btn:hover {
    background: linear-gradient(90deg, #265a96, #3674B5);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Login Link */
.login-link {
    margin-top: 15px;
    font-size: 14px;
}

.login-link a {
    color: #3674B5;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

.login-link a:hover {
    color: #265a96;
    text-decoration: underline;
}

/* Center the page content */
.table-title {
    text-align: center;
    font-size: 24px;
    color: #2C3E50;
    margin-bottom: 20px;
}

/* Center the table */
.custom-table {
    width: 90%;
    /* More space than 80% */
    margin: 20px auto;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}

/* Table Header */
.custom-table thead {
    background: #3674B5;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.custom-table thead th {
    padding: 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
}

/* Make sorting column stand out */
.sortable {
    cursor: pointer;
    transition: 0.3s;
}

.sortable:hover {
    color: #ffd700;
}

/* Table Rows */
.custom-table tbody tr {
    text-align: center;
    font-size: 16px;
    transition: background 0.3s;
}

/* Zebra Striping */
.custom-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* Row Hover Effect */
.custom-table tbody tr:hover {
    background: rgba(54, 116, 181, 0.2);
}

/* Table Cells */
.custom-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

/* Editable Fields */
.custom-table td[contenteditable="true"] {
    background: rgba(255, 255, 0, 0.1);
    border: 1px dashed #ccc;
    outline: none;
    transition: background 0.3s;
}

.custom-table td[contenteditable="true"]:focus {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #3674B5;
}

/* Button Styling */
.custom-btn {
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
}

.delete-button-modal {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.add-new-mark-btn {
    display: block;
    margin: 10px auto;
    background: #28a745;
    color: white;
}

/* Add Button */
.add-btn {
    display: block;
    margin: 10px auto;
    background: #28a745;
    color: white;
}

.add-btn:hover {
    background: #218838;
}

/* Save Button */
.save-btn {
    background: #3674B5;
    color: white;
}

.save-btn:hover {
    background: #285a96;
}

/* Delete Button */
.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* Toast Message Container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toast Messages */
.toast-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #28a745;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    max-width: 300px;
    animation: slideIn 0.5s ease-out;
}

/* Error Toast */
.toast-message.error {
    background: #dc3545;
}

/* Close Button */
.close-toast {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide Out Animation */
.toast-message.fade-out {
    animation: slideOut 0.5s ease-in forwards;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Contact Page Styles */
.contact-container {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
}

.contact-heading {
    color: #3674B5;
    font-size: 28px;
    margin-bottom: 10px;
}

.contact-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.contact-input-group {
    margin-bottom: 15px;
}

.contact-input-group input,
.contact-input-group textarea {
    width: 85%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    outline: none;
    transition: 0.3s ease-in-out;
}

.contact-input-group input:focus,
.contact-input-group textarea:focus {
    border-color: #3674B5;
    box-shadow: 0 0 5px rgba(54, 116, 181, 0.5);
}

.contact-btn {
    width: 45%;
    padding: 12px;
    font-size: 18px;
    background: #3674B5;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.contact-btn:hover {
    background: #285a96;
}

.contact-info {
    margin-top: 20px;
    font-size: 16px;
    color: #444;
    text-align: left;
}

.contact-info p {
    margin: 5px 0;
}


#confirmDelete {
    background-color: red;
    color: white;
}

#cancelDelete {
    background-color: gray;
    color: white;
}

/* Centered Edit Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    width: 350px;
    max-width: 90%;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

/* Modal Content */
.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Modal Heading */
.modal h3 {
    color: #2C3E50;
    text-align: center;
    margin-bottom: 15px;
}

/* Labels for Inputs */
.modal label {
    display: block;
    font-weight: bold;
    color: #2C3E50;
    margin-top: 10px;
    font-size: 14px;
}

/* Input Fields */
.modal input {
    width: 100%;
    padding: 10px;
    border: 1px solid #3674B5;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease-in-out;
    background: #f4f7fc;
}

.modal input:focus {
    border-color: #265a96;
    box-shadow: 0px 0px 8px rgba(38, 90, 150, 0.3);
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    width: 100%;
}

.modal-buttons button {
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 16px;
    width: 48%;
}

#saveEdit {
    background: #28a745;
    color: white;
}

#saveEdit:hover {
    background: #218838;
}

#cancelEdit {
    background: gray;
    color: white;
}

#cancelEdit:hover {
    background: #5a6268;
}

/* Edit Button */
.edit-btn {
    background: #3674B5;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn:hover {
    background: #265a96;
}

/* Pagination Container */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    font-size: 16px;
}

/* Select Dropdown Styling */
#rowsPerPage {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #3674B5;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

/* Pagination Controls */
.pagination {
    display: flex;
    align-items: center;
}

.pagination-btn {
    background: #3674B5;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.pagination-btn:hover {
    background: #265a96;
}

.pagination-btn:disabled {
    background: gray;
    cursor: not-allowed;
}

.search-container {
    margin-bottom: 20px;
    /* Spacing below the search box */
    padding: 15px 79px 0px 53px;
    /* Further increased right padding (8x) to shift left */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Keeps alignment to the right while shifting */
    gap: 15px;
    /* Space between label and input */
}

.search-label {
    font-weight: bold;
    white-space: nowrap;
    /* Prevents wrapping */
}

.search-box {
    padding: 10px;
    /* Comfortable input padding */
    width: 280px;
    /* Slightly wider input box */
    border: 1px solid #ccc;
    border-radius: 8px;
    /* Softer rounded corners */
}

/*add modal*/
/* Modal Styles */
.add-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.add-modal-content {
    background-color: #f9f9f9;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 60%;
    max-width: 500px;
}

.add-modal-content h3 {
    margin-top: 0;
    color: #333;
}

.add-modal-content label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.add-modal-content input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.add-modal-buttons {
    margin-top: 20px;
    text-align: right;
}

.add-modal-buttons button {
    margin-left: 10px;
}

#submitAddMark {
    background-color: #285a96;
    color: white;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.toast-message {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 250px;
}

.toast-message.error {
    background-color: #f44336;
}

.close-toast {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}


/* Center Login Box */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
    background: #f4f7fc;
    /* Light background to match professional theme */
}

/* Login Box */
.login-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 350px;
}

/* Heading */
.login-box h2 {
    color: #3674B5;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Input Fields */
.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 90%;
    padding: 10px;
    border: 1px solid #3674B5;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease-in-out;
}

.input-group input:focus {
    border-color: #265a96;
    box-shadow: 0px 0px 8px rgba(38, 90, 150, 0.3);
}

/* Button Styling */
.btn {
    background: linear-gradient(90deg, #3674B5, #4a8bd1);
    color: white;
    font-size: 18px;
    padding: 10px;
    width: 60%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.btn:hover {
    background: linear-gradient(90deg, #265a96, #3674B5);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Forgot Password & Register Link */
.forgot-password,
.register-link {
    margin-top: 15px;
    font-size: 14px;
}

.forgot-password a,
.register-link a {
    color: #3674B5;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

.forgot-password a:hover,
.register-link a:hover {
    color: #265a96;
    text-decoration: underline;
}