body {
    background: #f4f6fa;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.page-wrapper {
    max-width: 1200px;
    width: 98vw;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 18px;
    padding: 2em 1.2em 2em 1.2em;
    box-shadow: 0 2px 10px rgba(110,126,170,0.11);
}
h1 {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 22px;
    color: #222d45;
}
.header-checkboxes {
    display: flex;
    gap: 2em;
    margin-bottom: 18px;
    justify-content: center;
}
.edit-categories-btn {
    background: #ffb300;
    color: #22304a;
    font-weight: 700;
    border: none;
    border-radius: 7px;
    padding: 8px 19px;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.18s;
}
.edit-categories-btn:hover {
    background: #ffc847;
}
.centered {
    text-align: center;
    margin: 2em 0 0 0;
}
#itemsTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
    overflow-x: auto;
    display: block;
    max-width: 100%;
    min-width: 900px;
}
th, td {
    min-width: 115px;
    max-width: 210px;
    white-space: nowrap;
    padding: 8px 5px;
    text-align: left;
    border: none;
    font-size: 0.99em;
    vertical-align: middle;
}
th {
    background: #2196f3;
    color: #fff;
    font-weight: 600;
    border-radius: 0;
}
td {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.remove-btn {
    background: #e84949;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
}
.remove-btn:hover {
    background: #be2323;
}
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
    width: 98%;
    min-width: 55px;
    padding: 4px 7px;
    border-radius: 6px;
    border: 1px solid #c9d6e3;
    font-size: 0.96em;
    box-sizing: border-box;
}
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}
textarea {
    min-height: 44px;
    resize: vertical;
}
#itemsTableBody .template-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    margin-top: 0;
}
#itemsTableBody .template-btns button {
    display: inline-block;
    margin: 0;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #aaa;
    background: #e9f5ff;
    color: #1c2b44;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.93em;
    transition: background 0.14s;
}
#itemsTableBody .template-btns button:hover {
    background: #d1ebff;
}
#itemsTableBody .preview-html {
    margin-top: 8px;
    padding: 8px 7px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 38px;
    font-size: 0.98em;
    color: #2a3449;
}
@media (max-width: 1000px) {
    .page-wrapper {
        padding: 0.8em 0.4em;
    }
    #itemsTable th, #itemsTable td {
        min-width: 95px;
        font-size: 0.98em;
    }
}
@media (max-width: 700px) {
    #itemsTable {
        min-width: 600px;
    }
    .page-wrapper {
        padding: 0.2em 0.1em;
    }
}
.desc-preview,
.preview-html {
    margin-top: 8px;
    padding: 14px 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    min-height: 44px;
    font-size: 1.07em;
    color: #222d45;
    max-width: 950px;
    overflow-x: auto;
    margin-bottom: 13px;
}
.edit-categories-btn, .add-categories-btn {
    background: #FFA500;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 10px 20px;
    font-weight: bold;
    margin-right: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
}
.add-categories-btn {
    background: #51a351;
}
.edit-categories-btn:hover, .add-categories-btn:hover {
    opacity: 0.85;
}
