body {
    font-family: 'Trebuchet MS', sans-serif;
    background-color: #1f1f1f;
    text-align: center;
    font-size: 20px;
    color: white;
}

section {
    border: 2px solid grey;
    margin-top: 92px;
    overflow: auto;
}

/* TABLE FIXED WIDTH SETUP */
.table {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid dimGrey;
    font-family: sans-serif;
}

.thead {
    display: table-header-group;
}

.tbody {
    display: table-row-group;
}

.tr {
    display: table-row;
}

.th, .td {
    display: table-cell;
    border: 1px solid dimGrey;
    padding: 5px 10px;
    text-align: center;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ✅ Явная ширина колонок (подстрой по нужному количеству продуктов) */
.th:nth-child(1), .td:nth-child(1) { width: 15%; } /* Пациент */
.th:nth-child(2), .td:nth-child(2) { width: 15%; } /* Клиника */
.th:nth-last-child(2), .td:nth-last-child(2) { width: 15%; } /* Дата */
.th:last-child, .td:last-child { width: 15%; } /* Принято */

/* 🎯 Продукты — все, что между ними */
.td:nth-child(n+3):nth-last-child(n+3),
.th:nth-child(n+3):nth-last-child(n+3) {
    width: auto;
}

/* СТАТУСЫ */
.tr-closed {
    display: table-row;
    background-color: #002d73;
    color: white;
}

.tr-closed:hover {
    background: #606d82;
    cursor: pointer;
}

.tr-paid {
    display: table-row;
    background-color: #075700;
    color: white;
}

.tr-paid:hover {
    background: #608263;
    cursor: pointer;
}

/* КЛИКАБЕЛЬНЫЕ РЯДЫ */
a.tr {
    border: 1px solid dimGrey;
    text-decoration: none;
    color: white;
    display: table-row;
}

a.tr:hover {
    background: dimGrey;
    cursor: pointer;
}

/* МЕНЮ */
.menu {
    background-image: linear-gradient(#808080, #1f1f1f);
    overflow: auto;
    position: fixed;
    top: 0;
    width: 100%;
}

.menu a {
    float: left;
    display: block;
    padding: 14px 16px;
    font-size: 14px;
    color: white;
    text-decoration: none;
    text-align: center;
}

.menu a:hover {
    background-color: dimGrey;
    font-size: 16px;
}

.menu button {
    cursor: pointer;
}

nav header {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: black;
}

button {
    font-weight: bold;
    background-color: #fffed4;
    height: 30px;
    width: 75px;
}

input {
    height: 22px;
    font-size: 18px;
}

select {
    height: 22px;
    width: 128px;
    font-size: 18px;
}

/* НИЖНЕЕ МЕНЮ */
.low-menu {
    background-image: linear-gradient(#808080, #1f1f1f);
    overflow: auto;
    position: bottom;
    width: 100%;
}

.low-menu a,
.low-menu div {
    float: right;
    display: block;
    padding: 14px 16px;
    font-size: 14px;
    color: white;
    text-align: center;
    text-decoration: none;
}

.low-menu a:hover {
    background-color: dimGrey;
    border: 1px solid black;
}

.low-menu a button {
    height: 52px;
    width: 100%;
    font-size: 18px;
    cursor: pointer;
}

.low-button {
    height: 52px;
    width: 100%;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    background-color: #fffed4;
}

/* КНОПКИ */
.big-button {
    float: left;
    font-size: 20px;
    min-height: 110px;
    width: 100px;
}

.medium-button {
    font-size: 20px;
    font-weight: bold;
    min-height: 32px;
    width: auto;
    cursor: pointer;
}

.btn-main {
    font-size: 16px;
    padding: 10px 24px;
    border: none;
    background-color: #2196f3;
    color: white;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.3s ease;
}

.btn-main:hover {
    background-color: #0b7dda;
}

.btn-submit {
    font-size: 14px;
    padding: 6px 16px;
    background-color: #4caf50;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}

.btn-submit:hover {
    background-color: #3e8e41;
}

/* WORK FORM */
.work {
    padding: 1%;
    margin: auto;
    border: 2px solid dimGrey;
    width: 65%;
    min-height: 32px;
    float: center;
}

.work:hover {
    border-color: grey;
}

.work input {
    background-color: #1f1f1f;
    color: white;
}

.work input[type=submit] {
    background-color: #fffed4;
    color: black;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f1f1f;
}

::-webkit-scrollbar-thumb {
    background: #555;
}

::-webkit-scrollbar-thumb:hover {
    background: dimGrey;
}
