/* styles.css */
:root {
    --primary-text: #222;
    --red: #eb3b5a;
    --light-red: #f07081;
    --pale-red: #f4dfe2;
    --white: #fff;
    --grey: #ccc;
    --border: #ddd;
    --background: #f9f9f9;
    --pale-green: #eefaec;
}

/* reset styles */

*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
}

img {
    width: 100%;
}

/* main styles */

body {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 100%;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* mobile viewport bug fix */
    background: var(--white);
    color: var(--primary-text);
}

.desktop-hide {
    display: none;
    visibility: hidden;
}

.login-form {
    width: 400px;
    margin: 0 auto;
    padding-top: 14%;
}

.login-form .logo {
    margin: 0 auto;
    padding-bottom: 20px;
}

.login-form input, .login-form label {
    width: 100%;
}

.login-form input {
    padding: 8px;
    border: 1px solid var(--grey);
    width: 100%;
}

.login-form button {
    width: 180px;
    font-size: 90%;
}

.error {
    color: var(--red);
    font-weight: bold;
    padding-bottom: 20px;
}

h1 {
    font-weight: 400;
    font-size: 30px;
}

h2 {
    font-weight: 600;
    font-size: 24px;
    padding-bottom: 10px;
}

h3 {
    font-weight: 700;
    font-size: 18px;
    padding-bottom: 6px;
}

a, a:link {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.space-below {
    padding-bottom: 14px;
}

.red {
    color: var(--red);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px 30px 24px;
}

header {
    padding: 14px 0 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 200px;
}

.logout {
    width: 200px;
}

button {
    background: var(--red);
    padding: 10px 16px;
    border: none;
    border-radius: 30px;
    color: var(--white);
}

button:hover {
    background: var(--light-red);
}

.logout button {
    float: right;
}

.input-fields {
    padding: 0 0 20px 0;
    display: flex;
    justify-content: space-between;
}

.input-fields input {
    padding: 10px 16px;
    border: 1px solid var(--grey);
    width: 500px;
}

#productsTable {
    display: table;
    border-collapse: collapse;
    border: 1px solid var(--grey);
    width: 100%;
    margin-bottom: 20px;
}

#productsTable th, #productsTable td {
    border: 1px solid var(--border);
    padding: 8px;
    text-align: left;
}

#productsTable th {
    background-color: var(--grey);
    font-weight: 600;
}

#productsTable tr:nth-child(even) {
    background-color: var(--background);
}

#productsTable tr.green {
    background-color: var(--pale-green);
}
#productsTable tr:hover {
    background-color: var(--pale-red);
}
.fetching {
    background: #ccc !important;
}
#attendance-btn {
    margin-left: 10px;
    background-color: green;
}
.col-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 30px;
}
.left, .right {
    width: 49%;
    border: 1px solid var(--border);
    padding: 16px;
    background-color: var(--background);
}

.right a, .right a:link {
    color: var(--primary-text);
}

label {
    display: block;
    width: 100%;
    font-weight: 600;
    padding-bottom: 6px;
}

input, select {
    font-size: 100%;
    margin-bottom: 10px;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--grey);
    width: 100%;
    accent-color: var(--red);
}
input.date-time {
    width: auto;
}
input.num-input {
    width: 80px;
    margin-bottom: 0;
}
input[type=datetime-local] {
    accent-color: var(--red);
}
input[type=checkbox] {
    accent-color: var(--red);
    color: #fff;
    margin-bottom: 0;
  }

@media only screen and (max-width: 900px) {
    .mobile-hide {
        display: none;
        visibility: hidden;
    }
    .desktop-hide {
        display: block;
        visibility: visible;
    }
    .logo {
        width: 140px;
    }
    .input-fields, .col-container {
        flex-direction: column;
    }
    
    .input-fields input {
        padding: 10px 16px;
        border: 1px solid var(--grey);
        width: 500px;
    }
    .input-fields input {
        width: 100%;
    }
    .left, .right {
        width: 100%;
    }
    .left {
        margin-bottom: 20px;
    }
    .responsive-table {
        width: auto !important;
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    .login-form {
        width: 90%;
    }
    #productsTable tr:hover {
        background-color: transparent;
    }
}