:root {
    --primary: #4361ee;
    --online: #4cc9f0;
    --offline: #f72585;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2b2d42;
}

body {
    padding: 70px 0 60px;
    background-color: white;
    color: black;
}

body.full-height {
    height: 100vh;
}

@media (prefers-color-scheme: dark) {

    /* Стили для темной темы */
    :root {
        --primary: #4361ee;
        --online: #4cc9f0;
        --offline: #f72585;
        --bg-dark: #0f0f0f;
        --card-bg: #ffffff;
        --text: #d3d3d3;
    }

    body {
        background-color: #0f0f0f;
        color: #d3d3d3;
    }

    header {
        background-color: #000000 !important;
        box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

    header a:hover {
        color: #ffffff !important;
    }

    .nav-link.nav-link {
        color: #fff !important;

    }

    .nav-link.nav-link.active {
        color: #fff !important;
        background-color: #181a1b !important;
    }

    .nav-link.active:hover {
        background-color: #181a1b !important;
    }

    .nav-link:hover {
        background-color: #161718 !important;

    }

    .form-container {
        color: #000;
    }

    .form-control {
        color: #d3d3d3;
        background-color: #181a1b;
        border: none;
    }

    .form-control:focus {
        color: #d3d3d3;
        background-color: #181a1b !important;
        border: none;
    }

    .form-control label {
        color: #d3d3d3;
        background-color: #272727 !important;
    }

    .form-container h1 {
        color: #d3d3d3;
    }

    label {
        color: #d3d3d3
    }

    .table th,
    .form-check-label,
    h2,
    a {
        color: #d3d3d3;
    }

    .table th a {
        text-decoration: none;
    }

    .table th td a:hover {
        color: #d3d3d3;
    }

    .table th a {
        text-decoration: none;
        color: #d3d3d3 !important;
    }

    .table td a {
        color: #d3d3d3 !important;
    }

    .table td a:hover {
        color: #0a58ca !important;
    }

    .btn-list {
        background-color: rgb(0, 0, 0) !important;
        transition: 0.3s;
        color: #d3d3d3;
    }

    .btn-list:hover {
        border-color: #d3d3d3;
        color: #d3d3d3 !important;
    }

    .btn-list:focus {
        border-color: #d3d3d3;
        color: #d3d3d3;
        outline: none;
        box-shadow: none;
    }

    .btn-warning {
        background-color: #f8cb42;
        color: #000;
        border-color: #e0b63b;
    }

    .btn-warning:hover {
        background-color: #ffda75;
        color: #000 !important;
        border-color: #e6c45a;
    }

    .card {
        border-color: #272727;
    }

    .card-body {
        background-color: #181a1b !important;
        
    }

    .card-body .card-title,
    .card-body .card-text {
        color: #d3d3d3 !important;
    }

    .border {
        border-color: #272727 !important;
        border-width: 1px !important;
    }

    footer {
        color: #d3d3d3 !important;
        background-color: #000000 !important;
    }

    footer a {
        color: #d3d3d3 !important;
        text-decoration: none;
    }

    footer a:hover {
        color: #0a58ca !important;
        text-decoration: none;
    }

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
        background-color: #222 !important;
        color: #d3d3d3 !important;
        border: 1px solid #444 !important;
        -webkit-box-shadow: 0 0 0px 1000px #181a1b inset !important;
        -webkit-text-fill-color: #d3d3d3 !important;
        transition: background-color 5000s ease-in-out 0s;
    }

    .tab {
        color: #d3d3d3 !important;
    }

    .tab.active {
        background-color: #181a1b !important;
    }

    .tab.active:hover {
        background-color: #181a1b !important;
    }

    .tab:hover {
        background-color: #161718 !important;
    }

    .tab-content {
        display: none;
        padding: 20px;
        background-color: #0f0f0f !important;
    }

    .fancy-link:hover {
        color: #0a58ca !important;
    }

    .traffic-online {
        color: #d3d3d3 !important;
    }

    .wg_table td,
    .traffic-offline {
        color: #474747 !important;
    }

    .ovpn_table td {
        color: #d3d3d3;
    }

    .login-wrapper {
        background-color: #23272b !important;
        border: 1px solid #343a40 !important;
    }


}


header {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

header a {
    color: #000000;
}

.nav-link.nav-link.active {
    color: #fff !important;
    background-color: #2c3034;
}

.nav-link:hover {
    background-color: #f2f2f2;
}

.card-title,
.card-text {
    color: rgb(0, 0, 0) !important;
}

.btn-list {
    background-color: rgb(255, 255, 255);
    transition: 0.3s;
}

.table {
    table-layout: auto;
    width: auto;
    max-width: 100%;
}

.table td,
.table th {
    vertical-align: middle;
}

.table th {
    text-wrap: nowrap;

}

.table td a {
    color: #000000;
    text-decoration: none;
}

.table th a {
    color: #000000;
    text-decoration: none;
}

.table th a:hover {
    color: #000000;
}

.log_table {
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    width: 80%;
}

.speed-column {
    display: table-cell;
    transition: all 0.3s ease;
}

.speed-column.hidden {
    display: none !important;
}

.online-text {
    color: #437700;
}

.offline-text {
    color: #a12312;
}

.form-container {
    max-width: 100%;
    width: 320px;
}

#passwordHint {
    display: none;
    font-size: 1.0em;
}

#passwordHint.show {
    display: block;
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

#themeMenu {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    display: none;
}

#themeMenu button {
    display: block;
    margin: 5px 0;
}

.forgot-password-link {
    font-size: 1.1em;
}

footer {
    background-color: #ffffff;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    color: #000000;
    font-size: 0.9rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

footer a {
    color: #000000;
    text-decoration: none;
}

/* Стили для вкладок */
.tabs {
    display: flex;
    cursor: pointer;
    margin-bottom: 10px;
}

.tab {
    color: #000;
    padding: 10px 20px;
    text-decoration: none;
}

.tab:hover {
    color: #fff;
    background-color: #2c3034;
    text-decoration: none;
}

.tab.active {
    color: #fff;
    background-color: #2c3034;

}

.tab-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

.tab-content.active {
    display: block;
}

.form-check-label {
    text-align: left;
}

.fancy-link {
    text-decoration: none;
    color: #007bff;
}

.fancy-link:hover {
    color: #0056b3;
}

.traffic-online {
    color: #000000;
}

.traffic-offline,
.traffic-offline h4 {
    color: #ccc;
}

.login-wrapper {
    max-width: 360px;
    width: 100%;
    padding: 30px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: bold;
}

#passwordHint {
    display: none;
    font-size: 0.9rem;
    color: #b0b0b0;
}


.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0056b3;
    border-color: #0056b3;
}

.alert-danger {
    background-color: rgb(255, 199, 206);
    color: rgb(156, 0, 6);
    border-color: rgb(156, 0, 6);
}


