body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f6f8fa;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background-color: #004085;
    color: white;
    padding: 15px 0;
}

.site-header .logo a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

.main-nav a {
    color: white;
    text-decoration: none;
}

.main-nav a:hover {
    color: #ffc107;
}

.content {
    padding: 20px 0;
}

.site-footer {
    background-color: #004085;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

.hero {
    background-color: #e9f2ff;
    padding: 40px 0;
    text-align: center;
}

.hero h2 {
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #004085;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #002752;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #565e64;
}

/* Primary, warning and danger button colors */
.btn-primary {
    background-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #ffca2c;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

.features {
    padding: 40px 0;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    font-size: 16px;
    margin-bottom: 10px;
}

.form { max-width: 700px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.form-grid label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form select,
.form textarea {
    padding: 10px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.form-errors {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff5f5;
    border: 1px solid #f0c2c2;
    color: #7a1d1d;
}

/* таблицы форм */
.form-table {
    border-collapse: separate;
    border-spacing: 10px 12px;   /* отступы между ячейками */
    width: 100%;
    max-width: 720px;
}

.form-table th {
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
    font-weight: 600;
    padding-right: 8px;
    width: 40%;
}

.form-table td {
    vertical-align: middle;
    width: 70%;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="file"],
.form-table select,
.form-table textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* ошибки у полей */
td .errorlist {
    margin: 6px 0 0 0;
    padding: 8px 10px;
    list-style: none;
    background: #fff5f5;
    border: 1px solid #f0c2c2;
    border-radius: 6px;
    color: #7a1d1d;
}

/* кнопка */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #004085;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { background-color: #002752; }

/* адаптив: на узких экранах переносим в столбец */
@media (max-width: 640px) {
    .form-table, .form-table tbody, .form-table tr, .form-table th, .form-table td {
        display: block;
        width: 100%;
    }
    .form-table th {
        text-align: left;
        margin-top: 12px;
    }
    .form-table tr:last-child td { margin-top: 8px; }
}

/* --- Модалка верификации --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}
.modal-overlay[aria-hidden="false"] { display: flex; }

.modal {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff3cd;
    border-bottom: 1px solid #ffe8a1;
}

.modal-header h3 {
    margin: 0;
    color: #856404;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #856404;
}

.modal-body {
    padding: 18px;
    color: #444;
    line-height: 1.5;
}

.modal-footer {
    padding: 12px 18px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* кнопка уже есть .btn; можно добавить небольшой tweak */
.modal-footer .btn {
    min-width: 120px;
}

.btn-secondary {
  background-color: #6c757d;
}
.btn-secondary:hover {
  background-color: #565e64;
}

.form-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 1000px;
}

.form-table th,
.form-table td {
    text-align: left;          /* одинаковое выравнивание */
    vertical-align: middle;    /* вертикальное выравнивание */
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
}

.form-table th {
    font-weight: 600;
    background-color: #f8f9fa; /* лёгкий фон для заголовков */
}

/* таблицы — уже делали единое выравнивание */
.form-table { border-collapse: collapse; width: 100%; max-width: 1000px; }
.form-table th, .form-table td { text-align: left; vertical-align: middle; padding: 8px 12px; border-bottom: 1px solid #ddd; }
.form-table th { background: #f8f9fa; font-weight: 600; }

/* множественный выбор — увеличить высоту списков */
select[multiple] {
  min-height: 180px;
}

/* подсказочный блок (жёлтый) — уже есть .verification-message, переиспользуем */

.btn-group {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-group .btn {
  border-radius: 0;
  margin: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.btn-row {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;           /* расстояние между кнопками */
}

.btn-row .btn {
  border-radius: 6px; /* у каждой кнопки свой радиус */
}

.btn-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.form-table th,
.form-table td {
  text-align: left;
  vertical-align: middle;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

.form-table th { background: #f8f9fa; font-weight: 600; }

/* --- Teachers page --- */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.teacher-card {
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 16px;
    background: #fff;
    text-align: center;
}

.teacher-card img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px;
}

.teacher-card h3 {
    margin: 0 0 8px;
}

.teacher-card p {
    margin: 0;
}
