@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

:root {
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    --radius: 1rem;
    --page-bg: #f0f0f0;
    --btn-text-color: #fff;
    --main-color: #00819E;
    --main-color-lighter: #33a5bf;
    --main-color-darker: #00728c;
    --card-bg: #fff;
    --bs-success: #84a128;
    --bs-danger: ;
    --input-border-color: #ccc;
    --table-odd: color-mix(in srgb, var(--main-color) 9%, transparent);
    --table-even: color-mix(in srgb, var(--main-color) 3%, transparent);
    --danger-color: rgba(220, 53, 69, 0.2);
    --warning-color: rgba(255, 193, 7, 0.2);
    --secondary-color : rgba(108, 117, 125, 0.2);
     --secondary-color-darker : rgba(108, 117, 125, 0.4);
}

/* ====================== GENERIC STYLE ======================== */

* {
    /* overflow-x: hidden; */
    font-family: "Quicksand", sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 0 10dvh 0;
    background-color: var(--page-bg);
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    overflow-x: hidden;
}

tr, thead, table, tbody {
    border-color: lightgray !important;
}

tbody tr:nth-of-type(even){
    background-color: var(--table-even) !important;
}

tbody tr:nth-of-type(odd){
    background-color: var(--table-odd) !important;
}

tbody tr.expired-row {
    background-color: var(--danger-color) !important;
    color: #721c24;
}

tbody tr.warning-row {
    background-color: var(--warning-color) !important;
    color: #856404;
}

.flex {
    display: flex;
}

.mt-15 {
    margin-top: 15px;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.grid-row {
    grid-template-rows: 14dvh auto;
}

.centered {
    place-items: center;
}

.dvw-100 {
    width: 100dvw;
}

.dvh-100 {
    height: 100dvh;
}

.w-100 {
    width: 100%;
}

.relative {
    position: relative;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: end;
}

input[type="text"], input[type="password"] {
    border: 0;
    outline: 0;
    color: rgb(60, 66, 87);
    background-color: rgb(255, 255, 255);
    box-shadow: rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(60 66 87 / 16%) 0px 0px 0px 1px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    padding: 7px 13px;
    min-height: 28px;
    vertical-align: middle;
    transition: background-color .24s,box-shadow .24s;
    transition-property: background-color, box-shadow;
    transition-duration: 0.24s, 0.24s;
    transition-timing-function: ease, ease;
    transition-delay: 0s, 0s;
    border-color: var(--input-border-color);
}

input[type="text"]:focus, input[type="password"]:focus {
    box-shadow: rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(58 151 212 / 36%) 0px 0px 0px 4px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(60 66 87 / 16%) 0px 0px 0px 1px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px, rgb(0 0 0 / 0%) 0px 0px 0px 0px;
}

.label {
    margin: .5rem 0;
    display: block;
    font-weight: 600;
}

input::placeholder {
  opacity: 0.5;
}

.navbar {
    background-color: var(--card-bg);
    height: 8dvh;
    overflow: hidden;
}

.logo-nav {
   float: left;
}

.logo-nav img {
    width: 65%;
}

.logout-nav {
    float: right;
}

.logout-nav button {
    width: 35px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.m-0 {
    margin: 0;
}

.nav-item-container {
    width: 95%;
    margin: 0 auto;
    justify-content: space-between;
}

.btn {
    color: var(--btn-text-color);
    background-color: var(--main-color);
}

.btn.export {
    color: #495057;
    background-color: var(--secondary-color);
}

.btn.export:hover {
    color: #495057;
    background-color: var(--secondary-color-darker);
}

.btn-confirm {
    border: solid 1px var(--table-odd) !important;
    background-color: var(--table-even);
}

.btn-cancel {
    background: transparent;
}

.btn-confirm, .btn-cancel, .btn {
    transition: all .2s cubic-bezier(0.215, 0.610, 0.355, 1) !important;
    text-align: center;
    border-radius: .5rem !important;
    padding: .3rem 1rem !important;
    border: none;
    cursor: pointer;
    font-size: 15px;
    text-transform: capitalize;
}

.btn-confirm:hover {
    background-color: var(--table-odd);
}

.btn:hover {
    background-color: var(--main-color-lighter);
}

.flex .btn, .flex .btn-cancel, .flex .btn-confirm {
    margin-left: 10px;
}

#hs {
    display: none;
}

.display-inline {
    display: inline-block !important;
}

/* ======================               ======================== */

/* ====================== LOGIN FORM ======================== */

.login-container {
    width: 24dvw;
    height: 50dvh;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    margin: auto;
    background-color: var(--card-bg);
}

.login-form {
    width: 90%;
    height: 95%;
    margin: auto;
    padding: 0 1%;
}

.login-input {
    width: 100%;
    margin: auto;
    display: block;
}

#login {
    margin: 1rem 0;
    font-weight: 600;
    padding: .6rem 1.5rem !important;
}

#login:hover {
     background-color: var(--main-color-lighter);
}

.form-container *{
    width: 99%;
    margin-left: auto;
    margin-right: auto;
}

h3.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: solid 1px var(--input-border-color);
    max-width: fit-content !important;
    padding: 10px 0;
    margin: 20px 0 20px 0!important;
}

/* ======================             ======================== */

/* ====================== CERTS PAGE CSS ======================== */

.row {
    grid-template-columns: repeat(4, 1fr);
}

.certs-container * {
    margin: 0;
    padding: 5px 0;
}

.certs-container > .row:nth-child(odd){
    background-color: gray;
}

.certs-container > .row:nth-child(even){
    background-color: lightgray;
}

.content{
    width: 95%;
    margin: auto;
    background-color: var(--card-bg);
    border-radius: var(--radius);
}

.content > * {
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.delete-btn {
    margin: 10px 0;
    padding: .3rem .5rem;
    background-color: var(--main-color);
    color: var(--btn-text-color);
    border-radius: .3rem;
    border: none;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.215, 0.610, 0.355, 1) !important;
}

.delete-btn:hover {
    background-color: var(--main-color-lighter);
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 100dvw;
    z-index: -1;
    background-color: transparent;
}

.renewal-img {
    width: 28px;
    aspect-ratio: 1;
    opacity: .6;
    cursor: pointer;
}

/* override datatable */

.dt-paging-button {
    cursor: pointer !important;
    background-color: transparent !important;
    border: 0 !important;
    border-bottom: solid 1px var(--main-color-darker) !important;
}

.dt-paging-button.current {
    cursor: initial !important;
    background: transparent !important;
    border-bottom: solid 2px var(--main-color-darker) !important;
}

/* Top container */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Put length + button together on left */
.dt-top .dataTables_length,
.dt-top .dt-buttons {
    display: inline-block;
    margin-right: 10px;
}

/* Top container */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* LEFT side (length + button) */
.dt-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* RIGHT side (search) */
.dt-right {
    margin-left: auto;
}

/* Bottom container */
.dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Pagination bottom right */
.dt-pages {
    margin-left: auto;
}

.pswbtn-container {
    width: 150px;
}

.pswbtn-container button {
    width: inherit;
}

/* ========================            ========================== */

/* ====================== MODAL CSS ======================== */

.jw-modal {
    opacity: 0;
    transition:
        opacity 100ms ease-in-out,
        transform 100ms ease-in-out;
    position: fixed;
    left: 50% !important;
    top: 50% !important;
    transform: translate3d(-50%, -45%, 0) scale(0.96);
    width: 600px;
    height: 350px;
    inset: 0;
    z-index: 10000;
    padding: 10px;
    overflow: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
    pointer-events: none;
}

.jw-modal.open {
    opacity: 1;
    transform: translate3d(-50%, -50%) scale(1);
    pointer-events: auto;
}

.jw-modal-body {
    padding: 20px 20px 0 20px;
    background: var(--card-bg);
    height: 270px;
}

body.jw-modal-open .backdrop, body:has(.loader-anim) .backdrop{
    z-index: 1000;
    background-color: rgba(0, 0, 0, .1);
}

#modal-title, #modal-body {
    padding: 0 10px 10px 10px;
}

#modal-body input {
    margin-top: 15px;
}

input[type="file"] {
    margin: 0 !important;
    border: solid 1px var(--input-border-color);
    border-radius:.3rem;
    width: 100%;
    /* padding: .5rem 0; */
}

input[type="file"]::file-selector-button {
    background-color: var(--main-color-darker);
    border: none;
    padding: .5rem .7rem;
    border-radius:.3rem;
    color: var(--btn-text-color);
}

#modal-body p {
    margin: 5px 0;
    padding: 0;
}

.loader-container {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%,-50%);
    overflow: hidden;
    z-index: 5000;
}

.loader {
    border: 10px solid white;
    border-top: 10px solid var(--main-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 5000;
    opacity: 0;
}

.loader-anim {
    animation: spin 2s linear .4s infinite;
}

@keyframes spin {
    0% {
        opacity: 1;
        transform: rotate(0deg); 
    }
    100% { 
        opacity: 1;
        transform: rotate(360deg); 
    }
}

.hide-loader{
    display:none;
}

/* ========================        ========================== */