#p1 {
    display: grid;
    grid-template-areas:
        "smetas_2p"
        "position_1p"
    ;
    margin: 0 auto;
    gap: 10px;
}

.tableData1p {
    width: 100%;
}

.tableData1p tr th {
    text-align: center;
    padding: 5px;
    background-color: #e0e0e0;
    border: 1px solid #e0e0e0;
}

.tableData1p tr td {
    padding: 5px;
    border: 1px solid #e0e0e0;
}
.chooseSmeta{
        background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);

}
.chooseSmeta h3 {
   height: 34px;
   text-align: center;
   border-top-left-radius: 12px;
   border-top-right-radius: 12px;

    background: linear-gradient(
        to top,
        #f6f8fa,
        #eef2f6
    ); 
    border-bottom: 1px solid #d0d7de;
}
.card-footer {
    height: 34px;

    background: linear-gradient(
        to bottom,
        #f6f8fa,
        #eef2f6
    );

    border-top: 1px solid #d0d7de;
}

#smetas_2p {
    grid-area: smetas_2p;
    padding: 5px;
    width: 100%;
}
#position_1p {
    grid-area: position_1p;
    border-radius: 5px;
    padding-left: 5px;
    padding-right: 5px;
}
#position_1p h3{
    text-align: center;
}
#table-datalist_1p {
    width: 100%;
    text-align: center;
}
.smetas-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.smeta-item {
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
}

.smeta-item:hover {
    background: #f3f6fb;
}

.smeta-item.active {
    background: #dbe8ff;
    font-weight: 600;
}

.modalSmeta1p-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    z-index: 2000;
}

.modalSmeta1p-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;

    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);

    display: none;
    z-index: 2001;
    overflow: hidden;
}

.modalSmeta1p-window-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-gray-light);
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-gray-medium);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap:16px
}


.modalSmeta1p-window-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

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

/* Кнопка Excel */
.modalSmeta1p-excel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #1d6f42;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.modalSmeta1p-excel:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    opacity: 0.95;
}

.modalSmeta1p-excel .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Кнопка закрытия */
.modalSmeta1p-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #fff;
    color: #444;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.modalSmeta1p-close:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.modalSmeta1p-window-body {
    max-height: calc(90vh - 60px);
    overflow-y: auto;
    padding: 20px;
    
}


#smeta_1p table {
    width: 100%;
}

#smeta_1p td {
    padding: 6px 8px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

#smeta_1p td[colspan="5"] {
    text-align: center;
    border: none;
}

#smeta_1p td:first-child {
    font-weight: 500;
    color: #444;
}

.new-row-highlight {
    animation: rowHighlight 2.5s ease;
}

@keyframes rowHighlight {
    0% {
        background-color: #fff3a0;
    }
    100% {
        background-color: transparent;
    }
}

.add-svod-btn {
    padding: 10px 16px;
    width: 100%;
    border: none;
    font-size: 14px;
    font-weight: 700;
    background: #d9d9d9;
    color: #666;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.add-svod-btn:not(:disabled) {
    background: linear-gradient(135deg, #4caf50, #1d6f45);
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(255, 87, 34, 0.25);
}

.add-svod-btn:not(:disabled):hover {
    transform: translateY(-2px);
}

.preview-btn-1p {
    min-width: 180px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: white;
    cursor: pointer;
    background:  #4caf50;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transition: all 0.2s ease;
    animation: previewPulse3p 2.2s infinite;
}
.preview-btn-1p:hover {
    transform: translateY(-2px) scale(1.03);
}

@keyframes previewPulse3p {
    0% {
        box-shadow: 0 0 0 0 rgba(79,172,254,0.45);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79,172,254,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79,172,254,0);
    }
}