body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: #f0f2f5;
}

header {
    background: #3f51b5;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

nav button {
    margin: 5px 5px 0 0;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    color: #3f51b5;
    font-weight: bold;
}

nav button:hover {
    background: #e0e0e0;
}

section {
    padding: 20px;
}

/* ================= TABLE ================= */

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #3f51b5;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

td input, td select {
    width: 100%;
}

/* ширина колонок */
th[data-col="qualification"],
td[data-col="qualification"] {
    min-width: 200px;
}

th[data-col="specialization"],
td[data-col="specialization"] {
    min-width: 220px;
}

/* ================= FORM ================= */

input, select {
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 2px;
}

form {
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

form input, form select, form button {
    flex: 1 1 150px;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    background: #3f51b5;
    color: #fff;
    font-weight: bold;
}

button:hover {
    background: #303f9f;
}

/* ================= STATS ================= */

.stats-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    thead,
    th {
        display: none !important;
    }

    table, tbody, tr, td {
        display: block;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 8px;
        background: #fafafa;
    }

    td {
        display: flex;
        justify-content: space-between;
        border: none;
        padding: 6px 0;
        white-space: normal;
    }

    td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        white-space: nowrap;
    }

    td input {
        padding: 5px;
    }
}

td, th {
    white-space: normal;
}

/* инпуты */
td input, td select {
    width: 100%;
    white-space: normal;
    word-break: break-word;
    /*height: auto;*/
    line-height: 1.3;
}

.nav-btn{
    background:#eee;
    border:1px solid #ccc;
    padding:6px 12px;
    cursor:pointer;
}

.nav-btn.active{
    background:#4caf50;
    color:#fff;
}

input,
textarea,
select{
    padding:3px;
    font-size:14px;
    min-height: 20px;
    width: 100%;
}

textarea{
    resize:vertical;
}

.success{
    background:#e8f5e9;
    padding:10px;
    border-radius:6px;
    color:#2e7d32;
}

.error{
    background:#ffebee;
    padding:10px;
    border-radius:6px;
    color:#c62828;
}
