/
MashkoA
/
web-nodejs
Обзор
Документация
Войти
/
MashkoA
/
web-nodejs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
public/lab11/task2/styles.css
582 строки
11 KB
vSUS1w8OErscaPzljeOMKk86GKFCBmeQUlgjKJCmRenysib5Ll
lab11
15 май 2026, 08:21
15 май 2026, 08:21
60e2fdd
Код
Авторство
О чём код?
/* styles.css - Задание 2: Управление пользователями */ * { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; box-sizing: border-box; } body { background-color: #141526; color: white; min-height: 100vh; padding: 2em 1em; display: flex; flex-direction: column; align-items: center; } h1 { text-align: center; color: #e4ebff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1em; text-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.3); } h2 { color: #e4ebff; margin-bottom: 1.2em; text-align: center; font-size: 1.4rem; } h3 { color: #c0d1ff; margin: 1.5em 0 0.8em; font-size: 1.1rem; } /* Кнопки навигации */ .header-actions { margin-bottom: 2em; width: 100%; max-width: 100rem; display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; } /* Панель аутентификации */ .auth-panel { background: linear-gradient(135deg, #4965c8 0%, #3a52b8 100%); border-radius: 1.25em; padding: 1.5em 2em; margin-bottom: 2em; border: 0.125em solid #7c85d6; box-shadow: 0 0.5em 1.5625em rgba(0, 0, 0, 0.35); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5em; max-width: 100rem; width: 100%; } .auth-status { display: flex; align-items: center; gap: 1em; flex-wrap: wrap; } .auth-label { color: #c0d1ff; font-weight: 600; font-size: 1rem; } .auth-value { color: #e4ebff; font-weight: 600; font-size: 1.1rem; background: rgba(43, 53, 103, 0.85); padding: 0.5em 1em; border-radius: 0.625em; border: 0.0625em solid #7c85d6; } .auth-form-container { flex: 1; min-width: 300px; } .inline-form { display: flex; gap: 1em; align-items: center; flex-wrap: wrap; } .form-input-small { background-color: rgba(43, 53, 103, 0.85); border: 0.125em solid #7c85d6; border-radius: 0.9375em; padding: 0.75em 1em; color: white; font-size: 1rem; transition: all 0.3s ease; box-shadow: 0 0.25em 0.625em rgba(60, 70, 150, 0.5); flex: 1; min-width: 150px; } .form-input-small:focus { outline: none; border-color: #c0d1ff; box-shadow: 0 0 0 0.1875em rgba(192, 209, 255, 0.3); background-color: rgba(43, 53, 103, 1); } /* Основной контейнер */ .main-container { width: 100%; max-width: 100rem; display: flex; flex-direction: column; gap: 2em; } /* Контейнер контента */ .content-container { background: linear-gradient(135deg, #4965c8 0%, #3a52b8 100%); border-radius: 1.25em; padding: 2em; border: 0.125em solid #7c85d6; box-shadow: 0 0.5em 1.5625em rgba(0, 0, 0, 0.35); transition: all 0.3s ease; } .content-container:hover { box-shadow: 0 0.75em 2em rgba(0, 0, 0, 0.45); } /* Кнопки */ .btn { padding: 0.75em 1.5em; border: none; border-radius: 0.9375em; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; min-width: 140px; } .btn-small { padding: 0.5em 1em; font-size: 0.9rem; min-width: auto; } .btn-primary { background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%); color: white; box-shadow: 0 0.25em 0.625em rgba(76, 175, 80, 0.4); } .btn-primary:hover { background: linear-gradient(135deg, #4caf50 0%, #43a047 100%); transform: translateY(-0.125em); box-shadow: 0 0.375em 0.875em rgba(76, 175, 80, 0.6); } .btn-secondary { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: white; box-shadow: 0 0.25em 0.625em rgba(33, 150, 243, 0.4); } .btn-secondary:hover { background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%); transform: translateY(-0.125em); box-shadow: 0 0.375em 0.875em rgba(33, 150, 243, 0.6); } .btn-danger { background: linear-gradient(135deg, #e53935 0%, #c62828 100%); color: white; box-shadow: 0 0.25em 0.625em rgba(229, 57, 53, 0.4); } .btn-danger:hover { background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%); transform: translateY(-0.125em); box-shadow: 0 0.375em 0.875em rgba(229, 57, 53, 0.6); } .btn-info { background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%); color: white; box-shadow: 0 0.25em 0.625em rgba(156, 39, 176, 0.4); } .btn-info:hover { background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%); transform: translateY(-0.125em); box-shadow: 0 0.375em 0.875em rgba(156, 39, 176, 0.6); } .btn-tests { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); color: white; box-shadow: 0 0.25em 0.625em rgba(255, 152, 0, 0.4); } .btn-tests:hover { background: linear-gradient(135deg, #FF9800 0%, #EF6C00 100%); transform: translateY(-0.125em); box-shadow: 0 0.375em 0.875em rgba(255, 152, 0, 0.6); } /* Форма пользователя */ .user-form { margin-top: 1.5em; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em; margin-bottom: 1.5em; } .form-group { display: flex; flex-direction: column; gap: 0.5em; } .form-label { color: #e4ebff; font-weight: 500; font-size: 0.95rem; } .form-input, .form-select { background-color: rgba(43, 53, 103, 0.85); border: 0.125em solid #7c85d6; border-radius: 0.9375em; padding: 0.75em 1em; color: white; font-size: 1rem; transition: all 0.3s ease; box-shadow: 0 0.25em 0.625em rgba(60, 70, 150, 0.5); width: 100%; } .form-input:focus, .form-select:focus { outline: none; border-color: #c0d1ff; box-shadow: 0 0 0 0.1875em rgba(192, 209, 255, 0.3); background-color: rgba(43, 53, 103, 1); } .form-select { cursor: pointer; } .password-input-group { display: flex; gap: 0.5em; } .password-input-group .form-input { flex: 1; } .form-actions { display: flex; gap: 1em; margin-top: 2em; justify-content: center; } /* Заголовок таблицы */ .table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5em; flex-wrap: wrap; gap: 1em; } .table-actions { display: flex; gap: 1em; } /* Контейнер таблицы */ .table-container { overflow-x: auto; border-radius: 0.9375em; border: 0.125em solid #7c85d6; background-color: rgba(43, 53, 103, 0.85); } /* Таблица пользователей */ #users-table { width: 100%; min-width: 800px; border-collapse: collapse; } #users-table th { background: #2b3567; color: #e4ebff; font-weight: 600; padding: 1.2em 1em; text-align: left; border-bottom: 0.125em solid #7c85d6; white-space: nowrap; } #users-table td { padding: 1.2em 1em; text-align: left; border-bottom: 1px solid rgba(124, 133, 214, 0.3); color: #c0d1ff; } #users-table tr:last-child td { border-bottom: none; } #users-table tr:hover { background: rgba(67, 82, 160, 0.85); } /* Стили для ролей */ .role-badge { display: inline-block; padding: 0.25em 0.75em; border-radius: 0.5em; font-size: 0.85rem; font-weight: 600; } .role-user { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: white; } .role-admin { background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); color: white; } /* Колонка действий */ .actions-cell { min-width: 200px; } .actions-buttons { display: flex; gap: 0.5em; flex-wrap: wrap; } .btn-action { padding: 0.5em 0.75em; font-size: 0.85rem; min-width: auto; } .btn-view { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: white; } .btn-edit { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); color: white; } .btn-delete { background: linear-gradient(135deg, #e53935 0%, #c62828 100%); color: white; } /* Модальное окно удаления */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 9999; display: none; justify-content: center; align-items: center; } .modal.show { display: flex; } .modal-content { background: #4965c8; border-radius: 1.25em; padding: 2em; border: 0.125em solid #7c85d6; max-width: 500px; width: 100%; box-shadow: 0 1em 2.5em rgba(0, 0, 0, 0.5); } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5em; padding-bottom: 0.5em; border-bottom: 0.125em solid #7c85d6; } .modal-header h3 { margin: 0; color: #e4ebff; font-size: 1.4rem; } .modal-close { background: none; border: none; color: #e4ebff; font-size: 1.5rem; cursor: pointer; padding: 0; width: 2em; height: 2em; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.3s ease; } .modal-close:hover { background: rgba(255, 255, 255, 0.1); } .modal-body { margin-bottom: 1.5em; color: #c0d1ff; line-height: 1.6; } .modal-body .warning-text { color: #ff6b6b; font-weight: 600; margin-top: 0.5em; } .modal-actions { display: flex; gap: 1em; justify-content: flex-end; } /* Сообщения */ #form-msg, #table-msg { margin-top: 1em; padding: 1em; border-radius: 0.625em; text-align: center; font-weight: 500; font-size: 0.95rem; min-height: 2.5em; display: flex; align-items: center; justify-content: center; } .success { background-color: rgba(76, 175, 80, 0.1); color: #4caf50; border: 0.125em solid #4caf50; } .error { background-color: rgba(255, 107, 107, 0.1); color: #ff6b6b; border: 0.125em solid #ff6b6b; } /* Состояние загрузки */ .loading { text-align: center; color: #c0d1ff; font-style: italic; padding: 2em; } /* Скрытые элементы */ .hidden { display: none !important; } /* Добавить в конец styles.css */ .auth-message { margin-top: 0.5em; padding: 0.5em; border-radius: 0.5em; text-align: center; font-size: 0.9rem; } /* Стили для заголовков таблицы */ #users-table-head th { background: #2b3567; color: #e4ebff; font-weight: 600; padding: 1em; text-align: left; border-bottom: 0.125em solid #7c85d6; } /* Стили для ячеек таблицы */ #users-table td { padding: 1em; text-align: left; border-bottom: 1px solid rgba(124, 133, 214, 0.3); color: #c0d1ff; } /* Улучшенные стили для кнопок действий */ .actions-buttons { display: flex; gap: 0.5em; flex-wrap: wrap; } .btn-action { padding: 0.5em 0.75em; font-size: 0.85rem; min-width: auto; } .btn-edit { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); color: white; } .btn-delete { background: linear-gradient(135deg, #e53935 0%, #c62828 100%); color: white; } /* Стили для ролей */ .role-badge { display: inline-block; padding: 0.25em 0.75em; border-radius: 0.5em; font-size: 0.85rem; font-weight: 600; } .role-user { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: white; } .role-admin { background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); color: white; }