@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f5f5;
    color: #000;
    margin: 8px;
}

.header-title {
    text-align: center;
    margin-bottom: 10px;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.nav-buttons a {
    text-decoration: none;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid #ccc;
}

.nav-buttons a:hover {
    background-color: #e0e0e0;
}

table {
    border-collapse: collapse;
    margin: 0px auto;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    width: 70%;
    max-width: 100%;
    table-layout: auto;
}

table th,
table td {
    border: 1px solid #ccc;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

table thead tr {
    background-color: #f5f5f5;
    font-weight: 600;
    text-align: center;
}

table tr:nth-child(even) {
    background-color: #fafafa;
}

td {
    padding: 0;
    margin: 0;
    vertical-align: top;
}

td table {
    width: 100%;
}


.filter-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.filter-form h2 {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.filter-form .form-group {
    margin-bottom: 12px;
}

.filter-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.filter-form .form-control {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.filter-form .btn-submit {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3a7bd5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
}

.filter-form .btn-submit:hover {
    background-color: #2e5aa8;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.login-card {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3390ff;
}

.btn-login {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3a7bd5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #1a6ed8;
}

.error-message {
    background: #ffe5e5;
    color: #c00;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.optional {
    color: #888;
    font-size: 0.8em;
    font-weight: normal;
}

/* === Стили для чекбоксов и Check All / Uncheck All === */
.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    accent-color: #3390ff;
    cursor: pointer;
}

.checkbox-item:hover {
    background-color: #e0e0e0;
}

.checkbox-buttons {
    margin-bottom: 10px;
}

.checkbox-buttons button {
    padding: 6px 12px;
    margin-right: 5px;
    border-radius: 6px;
    border: 1px solid #3390ff;
    background-color: #e6f0ff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-buttons button:hover {
    background-color: #cce0ff;
    transform: translateY(-1px);
}

/* === Тёмная тема === */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .header-title { color: #ffffff; }

    .nav-buttons a {
        background-color: #1f1f1f;
        color: #e0e0e0;
        border: 1px solid #333;
    }

    .nav-buttons a:hover { background-color: #333; }

    table {
        border-color: #333;
        color: #e0e0e0;
    }

    table th, table td { border: 1px solid #333; }
    table thead tr { background-color: #1f1f1f; color: #fff; }
    table tr:nth-child(even) { background-color: inherit; }

    .filter-form { background-color: #1f1f1f; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
    .filter-form h2 { color: #fff; }
    .filter-form label { color: #e0e0e0; }
    .filter-form .form-control { background-color: #2a2a2a; color: #e0e0e0; border: 1px solid #444; }
    .filter-form .btn-submit { background-color: #3390ff; }
    .filter-form .btn-submit:hover { background-color: #2673c0; }

    .login-card { background-color: #1f1f1f; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
    .login-card h2 { color: #fff; }

    .form-control { background-color: #2a2a2a; color: #e0e0e0; border: 1px solid #444; }
    .form-control:focus { border-color: #3390ff; }

    .btn-login { background-color: #3390ff; }
    .btn-login:hover { background-color: #2673c0; }

    .error-message { background-color: #4d0000; color: #ff8080; }
    .optional { color: #aaa; }

    .checkbox-item { background: #2a2a2a; color: #e0e0e0; }
    .checkbox-item:hover { background-color: #3a3a3a; }
    .checkbox-item input[type="checkbox"] { accent-color: #3390ff; }

    .checkbox-buttons button {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border: 1px solid #3390ff;
    }
    .checkbox-buttons button:hover { background-color: #505050; }
}

/* === Стили для ников админов === */
.admin-nick {
    font-weight: 600;
    font-size: 15px;
    color: #3a7bd5;           /* красивый синий */
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
}

.admin-nick::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #3390ff;
    left: 0;
    bottom: -2px;
    transition: width 0.2s ease;
}

.admin-nick:hover {
    color: #2673c0;
}

.admin-nick:hover::after {
    width: 100%;
}

/* === Новые блоки для админки === */
.admin-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.admin-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
    transition: transform 0.2s;
}

.admin-card h2 { margin-bottom: 20px; font-size: 22px; font-weight: 700; }

.admin-card .form-group { margin-bottom: 15px; text-align: left; }

.admin-card .form-group label { display: block; margin-bottom: 5px; font-weight: 500; }

.admin-card .form-control { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid #ccc; font-size: 14px; }
.admin-card .form-control:focus { border-color: #3390ff; outline: none; }

.admin-card .btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.admin-card .btn-primary { background-color: #3a7bd5; color: #fff; }
.admin-card .btn-primary:hover { background-color: #2673c0; }

.admin-card .btn-danger { background-color: #d9534f; color: #fff; }
.admin-card .btn-danger:hover { background-color: #b03530; }

.table-wrapper { overflow-x: auto; width: 100%; max-width: 500px; }
.table-wrapper table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table-wrapper table th, .table-wrapper table td { padding: 10px; border: 1px solid #ccc; text-align: left; }
.table-wrapper table thead { background-color: #f5f5f5; font-weight: 600; }

@media (prefers-color-scheme: dark) {
    .admin-card { background: #1f1f1f; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
    .admin-card .form-control { background: #2a2a2a; color: #e0e0e0; border: 1px solid #444; }
    .table-wrapper table th, .table-wrapper table td { border-color: #333; }
    .table-wrapper table thead { background: #1f1f1f; color: #fff; }
    .admin-card .btn-primary { background-color: #3390ff; }
    .admin-card .btn-primary:hover { background-color: #2673c0; }
    .admin-card .btn-danger { background-color: #d9534f; }
    .admin-card .btn-danger:hover { background-color: #b03530; }
}


/* === Современное боковое меню === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    font-size: 18px;
    font-weight: 700;
    padding: 0 20px 15px;
    color: #3a7bd5;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
}

.sidebar a:hover {
    background: #f5faff;
    border-left: 3px solid #3390ff;
    color: #2673c0;
}

/* Активная вкладка */
.sidebar a.active {
    background: #eaf3ff;
    border-left: 3px solid #3390ff;
    color: #2673c0;
    /*font-weight: 600;*/
}

/* Основной контент */
.main-content {
    margin-left: 250px;
    padding: 25px;
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
    .sidebar {
        background: #1a1a1a;
        border-right: 1px solid #2a2a2a;
    }
    .sidebar-header {
        color: #3390ff;
    }
    .sidebar a {
        color: #ccc;
    }
    .sidebar a:hover {
        background: #242424;
        color: #3390ff;
    }
    .sidebar a.active {
        background: #202d3d;
        color: #fff;
    }
}
.hidden {
    display: none;
}

.tab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.server-switch {
    display: flex;
    gap: 8px;
    /*margin: 15px 10px;*/
    /*padding: 8px;*/
    background: #1a1a1a;
    border-radius: 12px;
    justify-content: center;
}

.server-switch a {
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    background: #2b2b2b;
    color: #ccc;
    transition: 0.2s;
    border: 1px solid transparent;
}

.server-switch a:hover {
    background: #333;
    color: #fff;
}
.server-switch a.active {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}