:root{
  --page-width: 1360px;
  --bg: #ffffff;
  --muted: #f1f1f1;
  --stroke: #e3e3e3;
  --neutral: #606060;
  --blue: #2ba1dc;
  --blue-interactive:#1fa0e0;
  --purple: #b82bdc;
  --purple-interactive:#be25e4;
  --green: #22cb22;
  --green-interactive:#19e019;
  --black: #111;
}
*,
html{
    box-sizing:border-box
}
body{
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;
    line-height:1;
    color:var(--black);
    background:var(--bg);
    padding:20px
}
.page{
    display:flex;
    justify-content:center
}
.wrapper{
    width:var(--page-width)
}
.top-bar{
    display:flex;
    align-items:center;
    justify-content:space-between
}
.title{
    font-weight:800;
    font-size:32px;
    margin:0
}
.controls{
    display:flex;
    gap:12px
}
.mobile-only{display:none}
.btn{
    border:0;
    padding:12px 24px;
    border-radius:999px;
    color:#fff;
    font-weight:600;
    cursor:pointer; 
    box-shadow: 0 0px 0px 5px rgba(0, 0, 0, 0.12); 
    border: 2px solid var(--bg);
}
.btn-blue{
    background:var(--blue)
}
.btn-purple{
    background:var(--purple)
}
.btn-green{
    background:var(--green)
}
.btn-primary{
    background:var(--black); 
    background: linear-gradient(90deg,rgba(0, 0, 0, 1) 0%, rgba(28, 28, 28, 1) 35%, rgba(51, 51, 51, 1) 100%);
}
.btn-blue:hover{
    background:var(--blue-interactive)
}
.btn-purple:hover{
    background:var(--purple-interactive)
}
.btn-green:hover{
    background:var(--green-interactive)
}
.btn-primary:hover{
    background: #2e2e2e; 
    background: linear-gradient(90deg,rgba(46, 46, 46, 1) 0%, rgba(54, 54, 54, 1) 35%, rgba(77, 77, 77, 1) 100%);
}
.divider{
    height:1px;
    background:var(--stroke);
    margin:18px 0
}
.main{
    display:flex;
    gap:24px
}
.available{
    flex:1
}
.chosen{
    flex:1;
    max-width:560px
}
.filter{
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid var(--stroke);
    border-radius:4px;
    padding:8px 10px;
    background:var(--bg)
}
.filter .icon{
    opacity:.8
}
.filter input{
    border:0;
    outline:none;
    font-size:16px;
    color:var(--neutral);
    width:100%
}
.items-grid{
    margin-top:12px;
    border:1px solid #e1e1e1;
    border-radius:4px;
    padding:16px;
    background:#fff;
    height:540px;
    overflow:auto
}
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.item {
    width: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.item .imgWrap {
    width: 85px;
    height: 85px;
    border: 3px solid var(--stroke);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
    border-radius: 48%;
    corner-shape: squircle;
    transition: all 0.2s;
}

.item:hover .imgWrap {
    border: 12px solid var(--bg);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item p {
    margin: 0;
    font-size: 14px;
    color: var(--black);
    text-align: center;
}

.table-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f2f2f2;
    border-radius: 4px;
    border: 1px solid var(--stroke);
    font-size: 14px;
}

.table-header .col {
    font-weight: 600;
}

.item-col {
    flex: 1;
}

.qty-col {
    width: 60px;
}

.unit-col {
    width: 90px;
}

.action-col {
    width: 24px;
}

.chosen-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: scroll;
    height: 550px;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--stroke);
    padding: 4px 8px;
    border-radius: 4px;
    background: #fff;
    transition: all 0.25s;
}

.list-row:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.list-row.dragging {
    opacity: 0.45;
}

.name {
    cursor: grab;
}

.handle:active,
.name:active {
    cursor: grabbing;
}

.name {
    flex: 1;
    font-weight: 600;
    line-height: 40px;
}
.qtyBox input{
    width: 60px;
    border: 1px solid var(--stroke);
    text-align: center;
    font-weight: 600;
    height: 40px;
    border-radius: 4px;
    line-height: 40px;
}
.qtyBox input:hover {
    outline:none;
    border: 1px solid var(--green);
}
.qtyBox input:focus{
    outline:none;
    border: 1px solid var(--green);
}

.unitBox .unitSelect{
    width: 80px;
    border: 1px solid var(--stroke);
    text-align: left;
    font-weight: 600;
    height: 40px;
    border-radius: 4px;
    line-height: 40px;
}
.unitBox .unitSelect:hover{
    outline:none;
    border: 1px solid var(--green);
}
.unitBox .unitSelect:focus{
    outline:none;
    border: 1px solid var(--green);
}
.removeBtn{
    width:24px;
    height:24px;
    border-radius:4px;
    border:0;
    background:transparent;
    cursor:pointer;
    font-weight: 600;
}
.removeBtn:hover{
    color:var(--green);
}


.placeholder{border:2px dashed #d8d8d8;border-radius:4px;margin:0}

/* small responsive */
@media (max-width:1200px){:root{--page-width:100%}.wrapper{width:100%}}


/* mobile responsive */
@media all and (max-width: 690px) {
    body {
        padding: 8px;
    }
    .divider {
        display: none;
    }
    .desktop-only {
        display: none;
    }
    .mobile-only {
        display: flex;
        gap: 8px;
    }
    .top-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        flex-direction: column;
        margin-top: 12px;
        margin-bottom: 24px;
    }
    .title {
        font-size: 24px;
    }
    .btn {
        font-size: 15px;
        padding: 16px;
        flex: 1;
    }
    .btn-blue,
    .btn-purple ,
    .btn-green {
        flex-grow: 1;
    }

    .main {
        display: block;
        height: 200px;
    }

    .available {
        display: block;
        height: 182px;
    }
    .filter {
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--stroke);
        border-radius: 4px;
        padding: 8px 10px;
        background: #fff;
    }
    .items-grid {
        margin-top: 12px;
        border: 1px solid var(--stroke);
        border-radius: 4px;
        padding: 12px;
        background: #fff;
        height: 120px;
        overflow: auto;
        overflow-y: hidden;
        border-radius: 4px;
        background: #f3f3f3;
        box-shadow: 0px 3px 2px rgb(255 255 255 / 40%) inset;
    }   
    .grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        scroll-behavior: smooth;
    }

    .item .imgWrap {
        width: 64px;
        height: 64px;
        border-radius: 50%;
    }

    .table-header {
        box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.2);
        position: relative;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        padding: 12px 16px;
        gap: 6px;
    }

    .chosen {
        max-width: 690px;
    }

    .chosen-list {
        margin-top: 0;
        margin-bottom: 20px;
        height: 362px;
        box-shadow: 0 3px 0px rgba(0, 0, 0, 0.2);
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .list-row {
        gap: 16px;
        padding: 8px 16px;
    }
}