/* ===== common.css – общие стили для всех страниц ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Базовый body – центрирование только для страниц входа/регистрации.
   Для дашборда и админки будет переопределён. */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ===== Общие стили для кнопок ===== */
.btn {
    width: 100%;
    padding: 14px;
    background-color: #764ba2;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background-color: #5a377d;
}

.btn:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
}

/* ===== Общие стили для полей ввода ===== */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #666666;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.input-group input:focus {
    border-color: #764ba2;
    outline: none;
    box-shadow: 0 0 8px rgba(118, 75, 162, 0.2);
}

/* ===== Стили для ошибок ===== */
.error-text {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    min-height: 18px;
}

.input-error {
    border-color: #d32f2f !important;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.2) !important;
}

/* ===== Общие ссылки ===== */
a {
    color: #764ba2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== Модальные окна ===== */
.modal {
    display: none; /* скрыто по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.close:hover {
    color: #333;
}

/* ===== Сообщения (успех/ошибка) ===== */
.message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

/* ===== Тикеты (поддержка) ===== */
.ticket-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fafafa;
}

.ticket-item .status {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.ticket-item .reply {
    background: #e8f5e9;
    padding: 8px;
    border-radius: 6px;
    margin-top: 8px;
    font-style: italic;
}

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.pagination button.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.pagination button:not(:disabled):hover {
    background: #f0f0f0;
}
