* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #222;
    line-height: 1.6;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
}

header h1 {
    margin: 0;
    font-size: 1.3rem;
}

header a {
    color: white;
    text-decoration: none;
}

main {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

footer {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

h2, h3 {
    color: #2c3e50;
}

.training-list {
    list-style: none;
    padding: 0;
}

.training-item a {
    display: block;
    background: white;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.15s;
}

.training-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.training-date {
    font-weight: bold;
    font-size: 1.1rem;
}

.training-time {
    color: #2980b9;
    font-weight: 500;
}

.training-location {
    color: #666;
    font-size: 0.9rem;
}

.training-count {
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.book-form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.book-form label {
    display: block;
    margin-bottom: 0.75rem;
}

.book-form input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 0.25rem;
}

.book-form button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.book-form button:hover {
    background: #219150;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.alert-warning {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.back {
    color: #2980b9;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.booking-list {
    list-style: none;
    padding: 0;
}

.booking-list li {
    background: white;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border-radius: 6px;
}

.empty {
    color: #888;
    font-style: italic;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.header-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}
@media (max-width: 500px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-nav {
        margin-top: 0.5rem;
    }
    .header-nav a:first-child {
        margin-left: 0;
    }
}
/* ---- Админка ---- */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #2c3e50;
    color: white;
    font-weight: 500;
}

.admin-table tr.cancelled td {
    color: #999;
    text-decoration: line-through;
}

.admin-table .actions-cell {
    white-space: nowrap;
}

.admin-table .actions-cell a,
.admin-table .actions-cell button {
    text-decoration: none;
    font-size: 1.1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
}

.inline-form {
    display: inline;
}

.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn:hover { background: #d5dbdb; }

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover { background: #219150; }

.btn-muted {
    background: #95a5a6;
    color: white;
}

.btn-muted:hover { background: #7f8c8d; }

.weekdays-fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.weekdays-fieldset legend {
    padding: 0 0.4rem;
    color: #2c3e50;
}

.weekday-label {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.3rem;
}

.hint {
    color: #777;
    font-size: 0.9rem;
    font-style: italic;
}