body {
    font-family: Arial, sans-serif;
    background: #f1f3f4;
    display: flex;
    justify-content: center;
    padding: 40px;
    margin: 0;
}

/* Общие стили формы */
.form-container {
    position: relative; /* чтобы кнопка могла позиционироваться внутри */
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 500px;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    font-size: clamp(14px, 1vw, 18px);
    color: #5f6368;
    display: block;
    margin-bottom: 0.5rem;
}

select, input[type="number"], input[type="text"], input[type="password"], textarea, button {
    width: 100%;
    padding: clamp(10px, 1vw, 16px);
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: clamp(14px, 1vw, 18px);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

select:focus, input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus, button:focus {
    border-color: #4285f4;
    outline: none;
}

textarea {
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100px;
}

button {
    background: #4285f4;
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    font-size: clamp(14px, 1vw, 18px);
}

button:hover {
    background: #3367d6;
}

.hidden {
    display: none;
}

.form-error {
    color: red;
    margin-bottom: 15px;
    font-size: 14px;
}

.password-wrapper {
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    margin: 0;
}

.password-toggle {
    width: 40px;
    height: 40px;
    background: transparent; /* убираем фон */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-toggle:focus,
.password-toggle:hover {
    outline: none;
    background: transparent; /* убираем синий фон при hover */
    box-shadow: none;
}

.password-toggle .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px;
    color: #000;
    line-height: 1;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* отступ между заголовком и формой */
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    font-size: 20px;
    transition: color 0.3s;
}

.logout-button:hover {
    color: #4285f4;
}

.logout-button .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px;
}

/* 📱 Мобильные экраны */
@media (max-width: 768px) {
    body {
        padding: 0;
        display: block;
    }

    .form-container {
        width: calc(100% - 32px); /* 16px отступы по бокам */
        margin: 16px auto;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: none;
    }
}

/* 💻 Компьютеры */
@media (min-width: 769px) {
    .form-container {
        width: 35%; /* шире чем 1/4 */
        min-width: 350px; /* минимум */
        max-width: 600px; /* максимум */
        margin: auto;
    }
}

.admin-title {
    text-align: center; /* выравнивание по центру */
    font-size: clamp(20px, 2vw, 28px); /* масштабируемый размер */
    margin-bottom: 20px;
    color: #202124;
}

/* Горизонтальное меню */
.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* в строку */
    gap: 10px;
    flex-wrap: wrap; /* перенос при нехватке места */
    justify-content: center; /* выравнивание по центру */
}

/* Вертикальное меню для admin/ */
.admin-sidebar.vertical {
    width: 100%; /* занимает всю ширину внутренней области */
    margin-bottom: 20px; /* небольшой отступ снизу */
}

.admin-sidebar.vertical ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
    width: 100%; /* растягиваем ul на всю ширину */
}

.admin-sidebar.vertical a {
    display: block;
    width: 100%; /* кнопки растягиваются на всю ширину */
    padding: 12px 0;
    border-radius: 30px;
    background: #f1f3f4;
    color: #202124;
    text-decoration: none;
    text-align: center;
    font-size: clamp(14px, 1vw, 16px);
    transition: background 0.3s, color 0.3s;
}

.admin-sidebar.vertical a.active,
.admin-sidebar.vertical a:hover {
    background: #4285f4;
    color: white;
}

.admin-sidebar li {
    margin: 0;
}

.admin-sidebar a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    background: #f1f3f4;
    color: #202124;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    font-size: clamp(14px, 1vw, 16px);
    white-space: nowrap; /* не переносить текст внутри кнопки */
}

/* Активная или при наведении */
.admin-sidebar a.active,
.admin-sidebar a:hover {
    background: #4285f4;
    color: white;
}

/* Мобильные экраны */
@media (max-width: 768px) {
    .admin-sidebar ul {
        flex-direction: column; /* вертикально */
        align-items: stretch; /* растягиваем кнопки на всю ширину */
        gap: 8px; /* немного меньше отступ между кнопками */
    }

    .admin-sidebar a {
        width: 100%; /* полностью по ширине */
        text-align: center;
        box-sizing: border-box;
    }
}

/* Кнопка создания пользователя */
.create-user-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-bottom: 20px;
    background: #34a853; /* зелёный для создания */
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: clamp(14px, 1vw, 16px);
    transition: background 0.3s;
}

.create-user-btn:hover {
    background: #2c8c46;
}

/* Список пользователей как карточки */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f3f4;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.3s;
}

.user-card-link {
    text-decoration: none;
    color: #202124;
    font-size: clamp(14px, 1vw, 16px);
    flex: 1; /* занимает оставшееся место */
}

.user-card:hover {
    background: #e0e0e0;
}

/* Кнопка удаления */
.delete-user-form {
    margin: 0;
}

.delete-button {
    text-decoration: none;  /* убираем подчеркивание */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f44336; /* красный круг, можно поменять */
    color: white;
    cursor: pointer;
    border: none;
}

.delete-button:hover {
    background: #d32f2f;
}

.delete-button .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    color: white;
    font-size: 20px;
}

.admin-divider {
    border: none; /* убираем стандартную рамку */
    height: 1px; /* толщина линии */
    background-color: #dadce0; /* цвет линии, гармонирует с формами */
    margin: 16px 0; /* отступ сверху и снизу */
}

.delete-form {
    display: flex;
    flex-direction: column; /* кнопки одна под другой */
    gap: 12px; /* вертикальный отступ между кнопками */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    color: white;
    width: 100%; /* растягиваем на всю ширину */
    box-sizing: border-box;
}

.btn-delete {
    background: #f44336;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-cancel {
    background: #4285f4;
}

.btn-cancel:hover {
    background: #3367d6;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
    color: #000;
    cursor: pointer;
    transition: color 0.3s;
}

.icon-button:hover {
    color: #4285f4; /* цвет при наведении */
}

.icon-button .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px;
    color: #000;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);

    /* по умолчанию скрыто (через inline style в div выше) */
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}