/* ------------------------- */
/* Общие стили               */
/* ------------------------- */
body {
    font-family: 'Affect', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

/* ------------------------- */
/* Шапка                     */
/* ------------------------- */
header {
    background-color: #2BA6A1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    box-sizing: border-box;
    padding: 0;
}

header .logo {
    max-height: 240px;
    height: auto;
}

/* ------------------------- */
/* Основное содержимое       */
/* ------------------------- */
main {
    padding: 20px;
    margin: 0 auto;
}
/* Ограничение ширины только для не-админских страниц */
main:not(.admin-page) {
    
}

/* ------------------------- */
/* Заголовки                 */
/* ------------------------- */
h1 {
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    color: #2BA6A1;
}
h2 {
    font-size: 1.3rem;
    color: #2BA6A1;
}
h3 {
    font-size: 1.1rem;
    color: #2BA6A1;
}

/* ------------------------- */
/* Таблицы                   */
/* ------------------------- */
table {
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    width: 100%;
}

th {
    background-color: #2BA6A1;
    color: white;
    padding: 10px;
    text-align: center;
}

td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #ccc;
}

/* Чередование строк */
tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ------------------------- */
/* Таблица админ-панели      */
/* ------------------------- */
.admin-table-wrapper {
    overflow-x: auto;
    margin-top: 10px;
}

.admin-table th,
.admin-table td {
    vertical-align: middle;
}

/* --- Столбцы --- */

/* 1. ID — автоширина */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    white-space: nowrap;
    width: 60px;
}

/* 2. ФИО — автоширина */
.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    white-space: nowrap;
    width: 150px;
}

/* 3. Дата рождения — фиксированная ширина */
.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 100px;
    white-space: nowrap;
    text-align: center;
}

/* 4. Паспорт — фиксированная ширина */
.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 140px;
    white-space: nowrap;
}

/* 5. Адрес —  перенос */
.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    width: 200px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* 6. Телефон — фиксированная ширина */
.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    width: 160px;
    white-space: nowrap;
}

/* 7. Комиссия */
.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    width: 180px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* 8. Должность */
.admin-table th:nth-child(8),
.admin-table td:nth-child(8) {
    width: 150px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* 9. Филиал */
.admin-table th:nth-child(9),
.admin-table td:nth-child(9) {
    width: 150px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* 10. Действия */
.admin-table th:nth-child(10),
.admin-table td:nth-child(10) {
    width: 150px;
    white-space: nowrap;
}

.admin-table td:nth-child(10) a {
    display: inline-block;
    margin: 0 3px;
    padding: 4px 8px;
    font-size: 13px;
}

/* ------------------------- */
/* Кнопки / ссылки           */
/* ------------------------- */
a, button {
    background-color: #2BA6A1;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
}

a:hover, button:hover {
    background-color: #238883;
}

.button {
    background-color: #2BA6A1;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
}

.button:hover {
    background-color: #238883;
}

/* ------------------------- */
/* Подвал                    */
/* ------------------------- */
footer {
    margin-top: 40px;
    background-color: #2BA6A1;
    color: white;
    text-align: center;
    padding: 15px 0;
}

footer .footer-link {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ddd;
    text-decoration: none;
}

footer .footer-link:hover {
    text-decoration: underline;
}

/* ------------------------- */
/* Форма клиента             */
/* ------------------------- */
form {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}

.form-row:nth-child(even) {
    background-color: #f9f9f9;
}

.form-row label {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-row input[type="checkbox"],
.form-row input[type="radio"] {
    width: auto;
    margin-right: 6px;
}

/* Чекбоксы в одну колонку */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Кнопка формы */
form button {
    display: block;
    width: 100%;
    padding: 10px 0;
    margin-top: 15px;
    background-color: #2BA6A1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

form button:hover {
    background-color: #238883;
}

/* ------------------------- */
/* Страница Спасибо          */
/* ------------------------- */
.thankyou-card {
    max-width: 640px;
    margin: 40px auto;
    text-align: center;
    padding: 30px 20px;
}

.thankyou-icon img {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    animation: pop 0.6s ease-out;
}

@keyframes pop {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

.thankyou-card h1 {
    margin-top: 0;
    color: #2BA6A1;
}

.thankyou-text {
    color: #555;
    font-size: 16px;
    margin: 8px 0 20px;
}

.thankyou-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.thankyou-note {
    margin-top: 18px;
    color: #999;
    font-size: 13px;
}

.consent-text {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

.consent-text a {
    color: #2BA6A1;
    text-decoration: underline;
    background: none;
    padding: 0;
    display: inline;
    font-size: 14px;
}

.consent-text a:hover {
    color: #238883;
    background: none;
    text-decoration: underline;
}

/* ------------------------- */
/* Адаптивность              */
/* ------------------------- */
@media (max-width: 768px) {
    .admin-table-wrapper {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 4px 6px;
    }
    
    main {
        padding: 10px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}
canvas {
    display: block;
    max-width: 100%;
}
