/* Базовые стили */
:root {
    --primary: #2c7a7b;
    --primary-dark: #234e52;
    --bg: #f7fafc;
    --card: #ffffff;
    --text: #2d3748;
    --muted: #718096;
    --border: #e2e8f0;
    --danger: #e53e3e;
    --success: #38a169;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Навигация */
.navbar {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.9;
}

.nav-links a:hover { opacity: 1; text-decoration: underline; }

/* Контент */
main { padding: 1.5rem 0; }

h1, h2, h3 { margin-top: 0; }

/* Карточки / секции */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: #edf2f7;
    font-weight: 600;
    color: var(--text);
}

tr:last-child td { border-bottom: none; }

/* Формы */
.form-group { margin-bottom: 1rem; }

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font: inherit;
    background: #fff;
}

textarea { min-height: 5rem; resize: vertical; }

button, .btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--primary);
    color: #fff;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .btn:hover { background: var(--primary-dark); }

.btn-secondary {
    background: #edf2f7;
    color: var(--text);
}

.btn-secondary:hover { background: #e2e8f0; }

/* Уведомления */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success { background: #c6f6d5; color: #22543d; border: 1px solid #9ae6b4; }
.alert-error   { background: #fed7d7; color: #742a2a; border: 1px solid #fc8181; }

/* Футер */
.footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Адаптив */
@media (max-width: 640px) {
    .navbar .container { flex-direction: column; gap: 0.5rem; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    td { border: none; border-bottom: 1px solid var(--border); position: relative; padding-left: 50%; }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 600;
        color: var(--muted);
    }
}
