/* Общие стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: #e9ecef;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

h2, h3 {
    margin-bottom: 15px;
    color: #333;
}

.success {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 10px;
}

.error {
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* Стили для навигационного меню (menu.php) */
.menu {
    background-color: #ffffff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-bottom: 10px;
}

.menu a {
    text-decoration: none;
    color: #007bff;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #0056b3;
    text-decoration: none;
}

.menu i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Стили для гамбургер-меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.menu-list {
    display: block;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu-list {
        display: none;
    }

    .menu-list.active {
        display: block;
    }

    .menu li {
        margin-bottom: 15px;
    }

    .menu a {
        font-size: 18px;
    }
}

/* Стили для форм (общие для всех страниц) */
form {
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

form input[type="text"],
form input[type="password"],
form input[type="datetime-local"],
form input[type="file"],
form textarea,
form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

form textarea {
    height: 150px;
    resize: vertical;
}

form button {
    padding: 12px 20px;
    background: linear-gradient(to right, #007bff, #00d4ff);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

form button:hover {
    background: linear-gradient(to right, #0056b3, #0096cc);
}

/* Стили для таблиц (page3.php, page5.php, page7.php, page8.php, page9.php, page10.php) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ced4da;
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

table td {
    vertical-align: middle;
}

/* Стили для кнопок действий (page3.php, page5.php, page7.php, page8.php, page9.php, page10.php) */
.action-btn {
    padding: 6px 12px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.action-btn.delete {
    background-color: #dc3545;
    color: #fff;
}

.action-btn.cancel {
    background-color: #ffc107;
    color: #333;
}

.action-btn.edit {
    background-color: #007bff;
    color: #fff;
}

.action-btn:hover {
    opacity: 0.85;
}

/* Стили для checkbox-группы (page2.php) */
.checkbox-group {
    margin-bottom: 20px;
}

.subscribers-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    padding: 10px;
    border-radius: 4px;
    background-color: #fff;
}

.subscribers-list label {
    display: block;
    margin: 5px 0;
}

/* Стили для формы личных сообщений (page2.php) */
.personal-messages-form {
    margin-bottom: 20px;
}

/* Стили для формы команд (page5.php) */
.command-form {
    margin-bottom: 20px;
}

.command-form input, .command-form textarea {
    width: 100%;
    margin-bottom: 15px;
}

/* Стили для формы приветствия (page6.php) */
.welcome-form {
    margin-bottom: 20px;
}

/* Стили для формы пользователей (page7.php) */
.user-form {
    margin-bottom: 20px;
}

/* Стили для таблицы статистики (page9.php) */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.stats-table th, .stats-table td {
    border: 1px solid #ced4da;
    padding: 12px;
    text-align: left;
}

.stats-table th {
    background-color: #f8f9fa;
}

/* Стили для формы и таблицы inline-кнопок (page10.php) */
.button-form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.buttons-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.buttons-table th, .buttons-table td {
    border: 1px solid #ced4da;
    padding: 12px;
    text-align: left;
}

.buttons-table th {
    background-color: #f8f9fa;
}

/* Стили для страницы логина (index.php) */
.login-form {
    max-width: 450px;
    margin: 80px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease-in;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: #333;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-form input:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

.login-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #007bff, #00d4ff);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.login-form button:hover {
    background: linear-gradient(to right, #0056b3, #0096cc);
    transform: translateY(-2px);
}

.login-form button:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .login-form {
        margin: 30px 15px;
        padding: 20px;
    }

    .login-form h2 {
        font-size: 24px;
    }

    .login-form input[type="text"],
    .login-form input[type="password"] {
        padding: 10px;
        font-size: 14px;
    }

    .login-form button {
        padding: 12px;
        font-size: 16px;
    }
}