* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "main"
        "footer";
    height: 100vh;
    margin: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* REUSABLE */

.text-center {
	text-align: center;
}

.my-10 {
    margin: 10px 0;
}

.wrapper-fit-centered {
	width: fit-content;
	margin: 0 auto;
    overflow-x: auto;
}

/* HEADER */

header {
    background: #2b5977;
    color: #fff;
    padding: 0 120px;
}

/* TOP NAVIGATION */

#logo {
    color: #fff;
    display: block;
}

.toggle,
    [id^=drop] {
    display: none;
}

nav {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    line-height: 50px;
}

#main-toggle {
    cursor: pointer;
    position: relative;
    user-select: none;
}

#main-toggle::after {
    font-family: 'FontAwesome';
    font-size: 1.3em;
    color: #fff;
    content: ' \f0c9';
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

nav ul li {
    margin: 0;
    display: inline-block;
    background: #2b5977;
}

nav a {
    display: block;
    padding: 0 20px;
    color: #fff;
    text-decoration: none;
}

nav ul label:hover,
nav ul li ul li label:hover,
nav ul li a:hover {
    background: #4682B4;
}

nav ul ul {
    display: none;
    position: absolute;
    top: 50px;
}

nav ul li:hover>ul {
    display: inherit;
}

nav ul ul li {
    width: 185px;
    display: list-item;
    position: relative;
}

nav ul ul ul li {
    position: relative;
    top: -50px;
    left: 185px;
}

/* li>a:after {
    content: ' +';
}

li>a:only-child:after {
    content: '';
} */

/* MAIN CONTENT AREA */

main {
    background: #ddd;
    color: #333;
}

.container {
    border: 1px dashed #777;
    width: 80%;
    margin: 0 auto;
    padding: 10px
}

/* BUTTONS */

.btn {
    background: #0096FF;
    color: #fff;
    font-weight: bold;
    border: 0;
    padding: 10px;
    transition: all .5s;
    cursor: pointer;
    display: block;
    text-align: center;
    width: fit-content;
	text-decoration: none;
}

.btn:hover {
    background: #0047AB;
    color: #fff;
    font-weight: bold;
    border: 0;
    padding: 10px;
    transition: all .5s;
}

.btn-full {
    width: 100%;
}

/* MESSAGES */
.success-msg {
    color: green;
}
.error-msg {
    color: red;
}

/* ADD USERS PAGE (users-add.php) */

.users {
    width: fit-content;
    margin: 0 auto;
}

.users form {
    width: 250px;
    max-width: 100%;
}

.users form label {
    display: block;
    margin-bottom: 5px;
}

.users form input[type="text"],
.users form input[type="password"],
.users form input[type="email"],
.users form select,
.users form input[type="date"], /* New style for date input */
.users form input[type="time"],
.users form input[type="number"] { /* New style for time input */
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.users form input[type="file"] {
    margin: 10px 0;
}

.users form input[type="submit"] {
    border: none;
    cursor: pointer;
}

.users .form-error {
    color: red;
    margin-top: 10px;
}

/* FOOTER */

footer {
    background: #2b5977;
    color: #fff;
    padding: 5px;
    text-align: center;
    font-size: 0.9em;
    line-height: 50px;
}

/* LOGIN PAGE */

.login-container {
    background: #ddd;
    height: 100vh;
}

.login {
    width: fit-content;
    height: fit-content;
    margin: 0 auto;
    margin-top: 150px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
  }
  
  .login h2 {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .login label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
  }
  
  .login input[type="text"],
  .login input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 3px;
    border: 1px solid #ccc;
  }
  
  .login input[type="submit"] {
    width: 100%;
    padding: 10px;
    background: #0096FF;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
  }
  
  .login input[type="submit"]:hover {
    background: #0047AB;
  }

  /* TABLES */

.tbl-fit {
    width: fit-content;
    overflow: auto;
    font-size: 0.9em;
}

.tbl-fit thead tr th {
    padding: 15px;
    border-bottom: 1px solid #999;
}

.tbl-fit tbody tr td {
    padding: 15px;
    border-bottom: 1px dotted #999;
}

.tbl-fit tbody tr:last-child td {
    border-bottom: none;
}

.users-table-buttons {
    display: flex;
}

.users-table-buttons .btn {
    margin: 0 5px;
}

/* Center the text in the "Image" column */
td img {
    display: block;
    margin: 0 auto;
}

/* Add some space around the image */
td img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.table {
    border-collapse: collapse;
    font-size: 0.9em;
}

.table th,
.table td {
    border: 1px solid #333;
    padding: 10px;
    white-space: nowrap;
}

.date-separator td {
    border-top: 2px solid #333;
    padding-top: 5px;
}

/* Add these styles to your existing CSS */

.even-row {
    background-color: #f2f2f2; /* Light gray background for even rows */
}

.odd-row {
    background-color: #ffffff; /* White background for odd rows */
}


/* Media Queries */

@media all and (max-width:768px) {

    /* header */

    header {
        padding: 0;
    }

    /* top navigation */

    #main-toggle,
    header {
        background: #4682B4;
    }

    nav {
        margin: 0;
    }

    nav ul{
        width: 100%;
    }

    .toggle+a,
    .menu {
        display: none;
    }

    .toggle {
        display: block;
        background: #2b5977;
        padding: 0 20px;
        color: #fff;
        text-decoration: none;
        border: none
    }

    .toggle i {
        font-size: 1.3em;
    }

    [id^=drop]:checked+ul {
        display: block;
    }

    nav ul li {
        display: block;
        width: 100%;
    }

    nav ul ul .toggle,
    nav ul ul a {
        padding: 0 40px;
    }

    nav ul ul ul a {
        padding: 0 80px;
    }

    nav ul ul ul a {
        background: #555;
    }

    nav ul li ul li .toggle,
    nav ul ul a {
        background: #444;
    }

    nav ul ul {
        position: static;
        color: #fff;
    }

    nav ul ul li:hover>ul,
    nav ul li:hover>ul {
        display: none;
    }

    nav ul ul li {
        display: block;
        width: 100%;
    }

    nav ul ul ul li {
        position: static;
    }

    /* MAIN CONTENT AREA */

    .container {
        width: 95vw;
    }

    .wrapper-fit-centered {
        max-width: 100%;
    }

    /* tables */

    .tbl-fit thead {
        display: none;
    }

    .tbl-fit,
    .tbl-fit tbody,
    .tbl-fit tr,
    .tbl-fit td {
        display: block;
        width: 100%;
    }

    .tbl-fit tr {
        margin-bottom: 15px;
    }

    .tbl-fit tbody tr td {
        text-align: right;
        position: relative;
    }

    .tbl-fit tbody tr:last-child td {
        border-bottom: 1px dotted #999;
    }

    .tbl-fit td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        padding-left: 15px;
        text-align: left;
    }
}

@media all and (max-width:768px) { 
    .login {
        width: 90vw;
    }
}