body {
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 20px;
    font-size: 14px;
    background-size: 20px 20px;
    background-color: var(--bg-page);
    background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
    color: var(--text-main);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

header>.title {
    display: flex;
    flex-direction: column;
}

header>.title>h1 {
    margin: 0;
    font-size: 24px;
    color: var(--color);
}

header>.title>span {
    color: var(--color);
    opacity: 0.7;
    margin: 3px 0;
    font-size: 12px;
}

header>.buttons {
    display: flex;
    gap: 8px;
}

header>.buttons>button,
header>.buttons>a {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 600;
    transition: opacity 0.2s;
    color: var(--color);
    background: var(--bg-card);
    text-decoration: none;
    font-size: 12px;
}

header>.buttons>a {
    background: var(--primary);
    color: var(--text-light);
    min-width: 70px;
    text-align: center;
}

@media (hover: hover) {
    header>.buttons>a:hover,
    header>.buttons>button:hover {
        opacity: 0.8;
    }
}

header>.buttons>.btn-save {
    background: var(--save);
    color: var(--text-light);
    margin-right: 10px;
}

@media(max-width: 750px) {
    header>.buttons {
        flex-direction: column;
        margin-left: 20px;
    }

    header>.buttons>button {
        width: 100%;
    }
}

.container {
    background: var(--bg-container);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

@media(max-width: 750px) {
    .container {
        max-height: calc(100vh - 210px);
    }
}

.container>h2 {
    margin-top: 0;
    color: var(--color);
    font-size: 18px;
    border-bottom: 1px solid var(--border-divider);
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.container>h2>div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.container>h2>div>button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 600;
    transition: opacity 0.2s;
    color: var(--text-light);
    font-size: 11px;
    background: var(--primary);
}

.container>div {
    gap: 20px;
    display: flex;
    flex-direction: column;
}


.card {
    border: 1px solid var(--border-dark);
    padding: 12px;
    border-radius: 10px;
    position: relative;
    background: var(--bg-card);
    transition: all 0.2s;
    display: flex;
    flex-direction: row;
    gap: 2px;
}

.card details {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--color);
    margin-top: 6px;
    padding: 10px;
}

.card summary {
    cursor: pointer;
    position: relative;
}

.card>.btn-del {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    transition: opacity 0.2s;
    background: var(--danger);
    color: var(--text-light);
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 4px 8px;
    font-size: 10px;
    z-index: 10;
}

.card>.block_label {
    display: flex;
    flex-direction: column;
}

.card .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.card .flex {
    display: flex;
    gap: 8px;
}

.card .flex>div {
    width: 100%;
}

.card label {
    font-size: 10px;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 4px;
    height: 24px;
}

.card label>span {
    color: var(--primary);
    font-size: 8px;
}

.card input,
.card select,
.card textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 7px;
    margin: 0;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background-color: var(--bg-card);
    color: var(--color);
}

.card textarea {
    resize: vertical;
    min-height: 100px;
    margin-bottom: 0;
}

.card select[multiple] {
    background: var(--bg-card);
}

.approx-box {
    height: 31px !important;
    margin: 5px 0 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.approx-box input {
    display: none;
}

.approx-box span {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    box-sizing: border-box;
    width: 100%;
    padding: 7px;
    margin: 0;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 13px !important;
    font-family: inherit;
    background-color: var(--bg-card);
}

.approx-box span::before {
    content: "Ні";
}

.approx-box input:checked+span::before {
    content: "Так";
}


smart-select {
    --smart-select-option-color: var(--color);

    --smart-select-border-color: var(--border-light);
    --smart-select-background: var(--bg-card);
    --smart-select-color: var(--bg-secondary);

    --smart-select-chip-fill: var(--danger);
    --smart-select-chip-border-color: var(--bg-secondary);
    --smart-select-chip-background: var(--border-dark);
    --smart-select-chip-color: var(--text-light);

    --smart-select-search-border: var(--border-dark);
    --smart-select-search-color: var(--color);

    --smart-select-hover-background: var(--bg-secondary);
    --smart-select-hover-color: var(--color);
    
    --smart-select-selected-background: var(--border-dark);
    --smart-select-selected-color: var(--text-light);
}