:root {
    --primary-dark: #d70000;
    --primary-dark-hover: #af0000;
    --primary-light: #fbe6e6;
    --primary-light-hover: #fcd3d3;
    --dark: #0d0d0d;
    --light: #f9f9f9;
    --grey-header: #FAFAFA;
    --light-grey: #ececec;
    --grey: #7c7c7c;
    --dark-grey: #6e6e6e;
    --base-font-size: 16px;

}

/* poppins-regular - latin_latin-ext */
@font-face {
    font-display: swap;
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    src: url('poppins.woff2') format('woff2');
}
/* poppins-500 - latin_latin-ext */
    @font-face {
    font-display: swap;
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    src: url('poppins500.woff2') format('woff2');
}

@media (prefers-reduced-motion: no-preference) {
    :root {
      scroll-behavior: smooth;
    }
}

[hidden] {
    display: none !important;
}

html {
    font-size: var(--base-font-size);
}

body {
    font-family: 'Poppins', sans-serif;
    padding: 0px;
    margin: 0px;
    border: 0px;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0px;
}

.m-0 {
    margin: 0px;
}

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

.card-preloader-wrapper {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

/* Loader */
.loader-wrapper {
    z-index: 9999;
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #000;
    box-shadow: 0 0 0 0 #0004;
    animation: l1 1s infinite;
}

@keyframes l1 {
    100% {box-shadow: 0 0 0 30px #0000}
}


/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 1px solid var(--light-grey);
    background-color: var(--grey-header);
    color: var(--grey);
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 28px;
}

.header-title {
    margin-left: 10px;
    padding-left: 10px;
    color: var(--grey);
    border-left: 1px solid var(--light-grey);
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* Pills */
.pill-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.pill {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
}

.pill:hover {
    background-color: var(--primary-light-hover);
}

.pill.active {
    background-color: var(--primary-dark);
    color: white;
}

@media (max-width: 768px) {
    .pill-container {
        flex-direction: column;
        align-items: center;
    }

    .pill {
        width: 100%;
        max-width: 300px;
    }
}


/* Common elements */
.card {
    border: 1px solid var(--light-grey);
    border-radius: 8px;
    padding: 32px 32px;
}

.card-wrapper {
    display: flex;
    justify-content: center;
}

.settings-card {
    width: 960px;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

.connection-card {
    width: 480px;
    max-width: 100%;
    box-sizing: border-box;
}

.connection_wrapper {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Wifi Table */
.wifi_table {
    width: 100%;
    border-collapse: collapse;
    padding: 10px 0px;
    min-width: 580px;
}

#wifi_scan_container {
    overflow-x: auto;
}

.wifi_table th {
    text-align: left;
    font-weight: 500;
    padding: 5px 5px;
}

.wifi_table thead {
    border-bottom: 1px solid var(--light-grey);
}

.wifi_table tbody tr {
    border-bottom: 1px solid var(--light-grey);
}

.wifi_table tbody td {
    padding: 5px 5px;
    border-bottom: 1px solid var(--light-grey);
}

.sbar {
    width: 100%;
    border: 1px solid var(--grey);
    border-radius: 50px;
}

.sbar > div {
    height: 10px;
}

.wifi_dbi_text {
    margin-top: 0px;
    margin-bottom: 0px;
}

.loading-dots span {
    animation: blink 1.5s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes blink {
    0%, 20% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}



.w-100 {
    width: 100% !important;
}

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

.mb-20 {
    margin-bottom: 20px;
}

.m-20 {
    margin-bottom: 20px;
    margin-top: 20px;
}

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

.mb-10 {
    margin-bottom: 10px;
}

.m-10 {
    margin-bottom: 10px;
    margin-top: 10px;
}

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

.mb-5 {
    margin-bottom: 5px;
}

.m-5 {
    margin-bottom: 5px;
    margin-top: 5px;
}

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

.mb-0 {
    margin-bottom: 0px;
}

.m-0 {
    margin: 0px;
}

/* EVCC Table */
table.evcc-table {
    width: 100%;
}

.evcc-table tr td:first-child {
    width: 70%
}

.evcc-buttons {
    vertical-align: middle;
    text-align: right;
}

/* Commandline */
.commandline-view {
    width: 100%;
    height: 250px;
    resize: none;
    border-radius: 6px;
}

/* Input Field */
.form-group {
    position: relative;
    margin-top: 20px;
}


input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
    border: 1px solid var(--light-grey);
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    color: var(--dark);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
    border-color: var(--dark-grey);
}

label {
    position: absolute;
    top: -10px;
    left: 12px;
    background-color: white;
    padding: 0 5px;
    font-size: 12px;
    color: var(--dark-grey);
}

a {
    text-decoration: none;
}

/* Tabs */
.tab {
    display: none;
}

.tab.active {
    display: block;
}

/* Messages */
.msg-warning {
    color: #ff9800;
    border: 1px solid #ffddab;
    background-color: #fff3e0;
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Buttons */
.swal2-confirm.swal2-styled {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    outline: none;
}

.btn {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn-slim {
    padding: 8px 16px;
    font-size: 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn.btn-primary, .btn-slim.btn-primary {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    outline: none;
}

.btn.btn-primary:hover, .btn-slim.btn-primary:hover {
    background-color: var(--primary-dark-hover);
}


.btn.btn-secundary, .btn-slim.btn-secundary {
    color: var(--dark);
    border: 1px solid var(--light-grey);
    background-color: white;
    outline: none;
}

.btn.btn-secundary:hover, .btn-slim.btn-secundary:hover {
    background-color: var(--light-grey);
}


.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: var(--grey);
}

/* Grid System*/
.container {
    padding: 15px;
    box-sizing: border-box;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.d-flex {
    display: flex;
}

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

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

.container-fluid {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.row {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
}

.col {
    flex: 1;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.col-1 { flex: 0 0 8.33%; max-width: 8.33%; }
.col-2 { flex: 0 0 16.66%; max-width: 16.66%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.33%; max-width: 33.33%; }
.col-5 { flex: 0 0 41.66%; max-width: 41.66%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.33%; max-width: 58.33%; }
.col-8 { flex: 0 0 66.66%; max-width: 66.66%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.33%; max-width: 83.33%; }
.col-11 { flex: 0 0 91.66%; max-width: 91.66%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (max-width: 768px) {
    .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}