* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f5f2;
    color: #222;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.card {
    width: 100%;
    max-width: 760px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.login-card {
    max-width: 420px;
}

h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 32px;
}

.subtitle {
    margin-top: 0;
    margin-bottom: 32px;
    color: #666;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-weight: bold;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
}

button {
    margin-top: 12px;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: #00acba;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #008f9b;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.menu-button {
    display: block;
    padding: 22px;
    border-radius: 16px;
    background: #f7f5f2;
    text-decoration: none;
    color: #222;
    font-weight: bold;
    text-align: center;
    border: 1px solid #e8e1d8;
}

.menu-button:hover {
    background: #efeae3;
}

.top-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.logout-link {
    color: #999;
    text-decoration: none;
    font-weight: bold;
}

.logout-link:hover {
    color: #222;
}

.error-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffe9e9;
    color: #a40000;
    font-size: 14px;
}

.contact-block {
    margin-bottom: 32px;
    padding: 24px;
    border-radius: 16px;
    background: #f7f5f2;
}

.back-link {
    color: #00acba;
    text-decoration: none;
    font-weight: bold;
}

.table-page {
    min-height: 100vh;
    padding: 32px;
    background: #f7f5f2;
}

.table-card {
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.download-button {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    background: #00acba;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.download-button:hover {
    background: #008f9b;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    border: 1px solid #e8e1d8;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
    font-size: 14px;
}

thead {
    background: #f7f5f2;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e8e1d8;
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #efeae3;
    vertical-align: top;
}

tbody tr:hover {
    background: #faf8f5;
}

@media (max-width: 640px) {
    .button-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 24px;
    }

    .top-row {
        flex-direction: column;
    }
}.contacts-button {
    grid-column: 1 / -1;

}@media (max-width: 640px) {
    .contacts-button {
        grid-column: auto;
    }
}.table-toolbar {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin-top: 24px;
    margin-bottom: 20px;
}

.toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toolbar-field label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
}

.toolbar-field input,
.toolbar-field select {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #ffffff;
    font-size: 15px;
}

.toolbar-field input:focus,
.toolbar-field select:focus {
    outline: none;
    border-color: #00acba;
}

.reset-button {
    height: 46px;
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #f7f5f2;
    color: #222;
    font-weight: bold;
    cursor: pointer;
}

.reset-button:hover {
    background: #efeae3;
}

.table-wrapper {
    max-height: calc(100vh - 260px);
    overflow: auto;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

@media (max-width: 820px) {
    .table-toolbar {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
        align-items: flex-start;
    }
}/* --- Inventory table fixes --- */

.table-page {
    min-height: 100vh;
    padding: 24px;
    background: #f7f5f2;
}

.table-card {
    width: 100%;
    max-width: none;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 24px;
    border: 1px solid #e8e1d8;
    border-radius: 14px;
    max-height: calc(100vh - 280px);
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 10px 12px;
    border-bottom: 1px solid #efeae3;
    line-height: 1.35;
}

th {
    font-weight: 700;
    background: #f7f5f2;
    white-space: nowrap;
}

td {
    white-space: normal;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}/* --- Mobile table layout --- */

@media (max-width: 768px) {
    .table-page {
        padding: 12px;
    }

    .table-card {
        padding: 18px;
        border-radius: 16px;
    }

    .table-card h1 {
        font-size: 24px;
        line-height: 30px;
    }

    .subtitle {
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 20px;
    }

    .top-row {
        flex-direction: column;
        gap: 16px;
    }

    .actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .download-button,
    .logout-link {
        width: 100%;
        text-align: center;
    }

    .table-toolbar {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 18px;
        margin-bottom: 18px;
    }

    .toolbar-field input,
    .toolbar-field select,
    .reset-button {
        height: 46px;
        font-size: 15px;
    }

    .table-wrapper {
        max-height: none;
        margin-top: 18px;
    }

    table {
        min-width: 920px;
        font-size: 13px;
    }

    th,
    td {
        padding: 9px 10px;
        text-align: center !important;
        vertical-align: middle !important;
    }
}