/* СБРОС / БАЗА */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #FAE3D8; /* персиковый фон страницы */
    color: #22252f;
}

h1 {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

header {
    padding: 24px 32px 16px;
    background: linear-gradient(135deg, #FDB6B9 0%, #FAE3D8 50%, #BFDED7 100%);
    color: #22252f;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

main {
    max-width: 1080px;
    margin: 20px auto;
    padding: 16px 24px 40px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* ГЛАВНОЕ МЕНЮ */

.main-menu {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.06em;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    /* базовая «холодная» мятная кнопка */
    background: #BFDED7;
    color: #22252f;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.10);
    transition:
        transform 0.12s ease-out,
        box-shadow 0.12s ease-out,
        background 0.15s ease-out,
        border-color 0.15s ease-out;
}

.menu-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Активный пункт — розовый */

.menu-link_active {
    background: #FDB6B9;
    border-color: rgba(0, 0, 0, 0.16);
}

/* ПОДМЕНЮ СОРТИРОВКИ */

.sub-menu {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}

.sub-menu__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px dashed rgba(0, 0, 0, 0.18);
    background: #FAE3D8; /* персиковый */
    color: #22252f;
    transition:
        background 0.12s ease-out,
        border-color 0.12s ease-out,
        color 0.12s ease-out;
}

.sub-menu__link:hover {
    background: #BFDED7; /* лёгкий переход к мяте */
}

/* Активный пункт подменю — розовый */

.sub-menu__link_active {
    border-style: solid;
    background: #FDB6B9;
}

/* ТАБЛИЦА КОНТАКТОВ */

table.contacts {
    width: 100%;
    margin-top: 18px;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

table.contacts thead {
    background: #BFDED7; /* шапка в мятном */
    color: #22252f;
}

table.contacts th,
table.contacts td {
    padding: 8px 10px;
    font-size: 13px;
}

table.contacts th {
    font-weight: 500;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

table.contacts tbody tr:nth-child(odd) {
    background: #ffffff;
}

table.contacts tbody tr:nth-child(even) {
    background: #FAE3D8; /* лёгкая персиковая зебра */
}

table.contacts tbody tr:hover {
    outline: 1px solid #BFDED7;
    background: #FDB6B9;
}

/* ПАГИНАЦИЯ */

.pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    color: #22252f;
    border: 1px solid transparent;
    background: #FAE3D8;
    transition:
        border 0.12s ease-out,
        background 0.12s ease-out,
        transform 0.1s ease-out;
}

/* по заданию при наведении – рамка 2px */

.pagination__page:hover {
    border: 2px solid #22252f;
    background: #BFDED7;
    transform: translateY(-1px);
}

.pagination__page_current {
    font-weight: 600;
    color: #22252f;
    background: #FDB6B9;
}

/* СООБЩЕНИЯ */

.message {
    margin: 12px 0;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    border-left: 4px solid transparent;
}

.message_success {
    background: #BFDED7;
    color: #1c4b32;
    border-left-color: #BFDED7;
}

.message_error {
    background: #FDB6B9;
    color: #7c2626;
    border-left-color: #FDB6B9;
}

/* ФОРМЫ (добавление / редактирование) */

.column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 460px;
    margin-top: 10px;
}

.add {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add label {
    flex: 0 0 130px;
    font-size: 13px;
}

.add input[type="text"],
.add input[type="email"],
.add input[type="date"],
.add select,
.add textarea {
    flex: 1 1 auto;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #FAE3D8;
    transition:
        border-color 0.12s ease-out,
        box-shadow 0.12s ease-out,
        background 0.12s ease-out;
}

.add input[type="text"]:focus,
.add input[type="email"]:focus,
.add input[type="date"]:focus,
.add select:focus,
.add textarea:focus {
    border-color: #BFDED7;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(191, 222, 215, 0.6);
    outline: none;
}

.add textarea {
    min-height: 70px;
    resize: vertical;
}

.form-btn {
    align-self: flex-start;
    margin-top: 8px;
    padding: 7px 20px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #BFDED7;
    color: #22252f;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.12s ease-out,
        box-shadow 0.12s ease-out,
        background 0.12s ease-out;
}

.form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
    background: #FDB6B9;
}

/* СПИСКИ В РЕДАКТИРОВАНИИ / УДАЛЕНИИ */

.edit-list,
.delete-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 12px;
}

.edit-list__item,
.delete-list__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
    background: #BFDED7;
    color: #22252f;
    transition:
        background 0.12s ease-out,
        transform 0.1s ease-out;
}

.edit-list__item:hover,
.delete-list__item:hover {
    background: #FAE3D8;
    transform: translateY(-1px);
}

.edit-list__item_current {
    background: #FDB6B9;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.14);
}
