body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, footer {
    background-color: #222;
    color: #fff;
    padding: 1rem;
}

main {
    flex-grow: 1;
    padding: 1rem;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 0.5rem;
}
.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.footer-left {
    font-weight: bold;
}

.footer-nav a {
    color: #ccc;
    margin-right: 1rem;
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box input {
    padding: 0.6rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.login-box button {
    padding: 0.7rem;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-box button:hover {
    background-color: #0056b3;
}

.login-box .error {
    color: #dc3545;
    font-size: 0.9rem;
    text-align: center;
}


/* 🎯 Общий стиль для всех таблиц */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

.data-table th {
    background-color: #f4f4f4;
    text-align: left;
}

.data-table tbody tr:hover {
    background-color: #fafafa;
}

/* Кнопки */
button {
    padding: 6px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e0e0e0;
}

/* Delete */
.delete-btn {
    color: #fff;
    background-color: #d9534f;
}

.delete-btn:hover {
    background-color: #c9302c;
}

/* Общая обёртка модалки */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: auto;
}

/* Контейнер модалки */
.modal {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 90vw;
    min-width: 500px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Заголовок */
.modal h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Общий стиль формы */
.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Поля ввода */
.modal .input,
.modal textarea,
.modal select {
    width: 100%;
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

/* Кнопки */
.modal button {
    padding: 8px 12px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Кнопка отправки */
.modal button[type="submit"] {
    background-color: #007bff;
    color: white;
}

.modal button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Кнопка отмены */
.modal button[type="button"] {
    background-color: #f0f0f0;
    color: #333;
}

.modal button[type="button"]:hover {
    background-color: #ddd;
}

/* Таблица пользователей в модалке */
.modal .modal-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.modal-table-scroll {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}


.modal .modal-table th,
.modal .modal-table td {
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.modal .modal-table th {
    background-color: #f9f9f9;
    font-weight: bold;
}
/* В CSS */
.message-row.sent {
    background-color: rgba(0, 255, 0, 0.1);
}
.message-row.failed {
    background-color: rgba(255, 0, 0, 0.1);
}

.loader {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem;
}
.modal-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 10px;
}

.spinner {
    border: 4px solid #ccc;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.5s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
.fade-enter-to, .fade-leave-from {
    opacity: 1;
}

.toast {
    position: fixed;
    top: 6rem;
    right: 1rem;
    background: #333;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    opacity: 0.95;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
/* Типы */
.toast.success {
    background-color: #28a745;
    color: #fff;
}

.toast.error {
    background-color: #dc3545;
    color: #fff;
}

.toast-icon {
    font-size: 1.2rem;
}
.msg-failed-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
    opacity: 0.8;
}
.inline-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ccc;
    border-top: 3px solid #666;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
}
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}
.pagination button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
}
.pagination button.active {
    background-color: #222;
    color: #fff;
    border-color: #222;
}
.full-modal-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 10px;
}
.full-modal-loader-overlay .spinner {
    border: 4px solid #ccc;
    border-top: 4px solid #222;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
}

